From: Nicholas Mc Guire Date: Sun, 18 Jan 2015 11:53:24 +0000 (+0100) Subject: comedi: rtd520: if condition with no effect - if identical to else X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b15f0277d75530d0c2e77c9dc7bc22dca137cf18;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index 06ae4367440d..3ccdadeb371f 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -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" */