: Removed an unnecessary #if
PATCH 6/6 : Removed an unnecessary #if
From: Hatim Muhammed <[email protected]>
This removed #if had 1 as its condition, hence it's body will always execute and its #else block will never
Signed-off-by Hatim Muhammed <[email protected]>
--- drivers/comedi/drivers/s526.c | 49 ----------------------------------- 1 file changed, 49 deletions(-)
drivers/comedi/drivers/s526.c +0 -49
@@ -229,7 +229,6 @@ static int s526_gpct_insn_config(struct comedi_device *dev,*/ devpriv->gpct_config[chan] = data[0 ]; -#if 1 /* Set Counter Mode Register */ val = data[1 ] &0xffff ;outw (val, dev->iobase +S526_GPCT_MODE_REG (chan));
@@ -246,54 +245,6 @@ static int s526_gpct_insn_config(struct comedi_device *dev,* dev->iobase + S526_GPCT_CTRL_REG(chan)); */ } -#else - val =S526_GPCT_MODE_CTDIR_CTRL_QUAD ; - -/* data[1] contains GPCT_X1, GPCT_X2 or GPCT_X4 */ -if (data[1 ] ==GPCT_X2 ) - val |=S526_GPCT_MODE_CLK_SRC_QUADX2 ; -else if (data[1 ] ==GPCT_X4 ) - val |=S526_GPCT_MODE_CLK_SRC_QUADX4 ; -else - val |=S526_GPCT_MODE_CLK_SRC_QUADX1 ; - -/* When to take into account the indexpulse: */ -/* -* if (data[2] == GPCT_IndexPhaseLowLow) { -* } else if (data[2] == GPCT_IndexPhaseLowHigh) { -* } else if (data[2] == GPCT_IndexPhaseHighLow) { -* } else if (data[2] == GPCT_IndexPhaseHighHigh) { -* } -*/ -/* Take into account the index pulse? */ -if (data[3 ] ==GPCT_RESET_COUNTER_ON_INDEX ) { -/* Auto load with INDEX^ */ - val |=S526_GPCT_MODE_AUTOLOAD_IXRISE ; - } - -/* Set Counter Mode Register */ - val = data[1 ] &0xffff ; -outw (val, dev->iobase +S526_GPCT_MODE_REG (chan)); - -/* Load the pre-load register */ -s526_gpct_write (dev, chan, data[2 ]); - -/* Write the Counter Control Register */ -if (data[3 ]) -outw (data[3 ] &0xffff , - dev->iobase +S526_GPCT_CTRL_REG (chan)); - -/* Reset the counter if it is software preload */ -if ((val &S526_GPCT_MODE_AUTOLOAD_MASK ) == -S526_GPCT_MODE_AUTOLOAD_NONE ) { -/* Reset the counter */ -outw (S526_GPCT_CTRL_CT_RESET , - dev->iobase +S526_GPCT_CTRL_REG (chan)); -/* Load the counter from PR0 */ -outw (S526_GPCT_CTRL_CT_LOAD , - dev->iobase +S526_GPCT_CTRL_REG (chan)); - } -#endif break ;case INSN_CONFIG_GPCT_SINGLE_PULSE_GENERATOR :
Signature · 1 line
2.35.1