Skip to content

Commit b15f027

Browse files
hofratgregkh
authored andcommitted
comedi: rtd520: if condition with no effect - if identical to else
The if and the else branch code are identical - so the condition has no effect on the effective code - this patch removes the condition and the duplicated code. Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 053e514 commit b15f027

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/staging/comedi/drivers/rtd520.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,10 +1012,8 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
10121012
readw(dev->mmio + LAS0_CLEAR);
10131013

10141014
/* TODO: allow multiple interrupt sources */
1015-
if (devpriv->xfer_count > 0) /* transfer every N samples */
1016-
writew(IRQM_ADC_ABOUT_CNT, dev->mmio + LAS0_IT);
1017-
else /* 1/2 FIFO transfers */
1018-
writew(IRQM_ADC_ABOUT_CNT, dev->mmio + LAS0_IT);
1015+
/* transfer every N samples */
1016+
writew(IRQM_ADC_ABOUT_CNT, dev->mmio + LAS0_IT);
10191017

10201018
/* BUG: start_src is ASSUMED to be TRIG_NOW */
10211019
/* BUG? it seems like things are running before the "start" */

0 commit comments

Comments
 (0)