comedi: rtd520: if condition with no effect - if identical to else
authorNicholas Mc Guire <der.herr@hofr.at>
Sun, 18 Jan 2015 11:53:24 +0000 (12:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 11:59:08 +0000 (19:59 +0800)
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>
drivers/staging/comedi/drivers/rtd520.c

index 06ae4367440d53c47824d35c6e188b331385800a..3ccdadeb371f0dbe00a0841cdcd18d6add6bf60c 100644 (file)
@@ -1012,10 +1012,8 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        readw(dev->mmio + LAS0_CLEAR);
 
        /* TODO: allow multiple interrupt sources */
-       if (devpriv->xfer_count > 0)    /* transfer every N samples */
-               writew(IRQM_ADC_ABOUT_CNT, dev->mmio + LAS0_IT);
-       else                            /* 1/2 FIFO transfers */
-               writew(IRQM_ADC_ABOUT_CNT, dev->mmio + LAS0_IT);
+       /* transfer every N samples */
+       writew(IRQM_ADC_ABOUT_CNT, dev->mmio + LAS0_IT);
 
        /* BUG: start_src is ASSUMED to be TRIG_NOW */
        /* BUG? it seems like things are running before the "start" */