This for() loop isn't needed. Nothing in the loop uses the 'i' variable. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/me_daq.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/staging/comedi/drivers/me_daq.c b/drivers/staging/comedi/drivers/me_daq.c index 71188fb..a2b542e 100644 --- a/drivers/staging/comedi/drivers/me_daq.c +++ b/drivers/staging/comedi/drivers/me_daq.c @@ -319,15 +319,12 @@ static int me_ao_insn_write(struct comedi_device *dev, writew(devpriv->ctrl2, dev->mmio + ME_CTRL2_REG); /* Set dac-control register */ - for (i = 0; i < insn->n; i++) { - /* clear bits for this channel */ - devpriv->dac_ctrl &= ~ME_DAC_CTRL_MASK(chan); - if (range == 0) - devpriv->dac_ctrl |= ME_DAC_CTRL_GAIN(chan) | - ME_DAC_CTRL_BIPOLAR(chan); - else if (range == 1) - devpriv->dac_ctrl |= ME_DAC_CTRL_BIPOLAR(chan); - } + devpriv->dac_ctrl &= ~ME_DAC_CTRL_MASK(chan); + if (range == 0) + devpriv->dac_ctrl |= ME_DAC_CTRL_GAIN(chan) | + ME_DAC_CTRL_BIPOLAR(chan); + else if (range == 1) + devpriv->dac_ctrl |= ME_DAC_CTRL_BIPOLAR(chan); writew(devpriv->dac_ctrl, dev->mmio + ME_DAC_CTRL_REG); /* Update dac-control register */ -- 2.5.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel