Commit 46ada8af authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: me_daq: remove useless for() loop

This for() loop isn't needed. Nothing in the loop uses the 'i'
variable. Remove it.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 16aa2a66
...@@ -319,15 +319,12 @@ static int me_ao_insn_write(struct comedi_device *dev, ...@@ -319,15 +319,12 @@ static int me_ao_insn_write(struct comedi_device *dev,
writew(devpriv->ctrl2, dev->mmio + ME_CTRL2_REG); writew(devpriv->ctrl2, dev->mmio + ME_CTRL2_REG);
/* Set dac-control register */ /* Set dac-control register */
for (i = 0; i < insn->n; i++) { devpriv->dac_ctrl &= ~ME_DAC_CTRL_MASK(chan);
/* clear bits for this channel */ if (range == 0)
devpriv->dac_ctrl &= ~ME_DAC_CTRL_MASK(chan); devpriv->dac_ctrl |= ME_DAC_CTRL_GAIN(chan) |
if (range == 0) ME_DAC_CTRL_BIPOLAR(chan);
devpriv->dac_ctrl |= ME_DAC_CTRL_GAIN(chan) | else if (range == 1)
ME_DAC_CTRL_BIPOLAR(chan); devpriv->dac_ctrl |= 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); writew(devpriv->dac_ctrl, dev->mmio + ME_DAC_CTRL_REG);
/* Update dac-control register */ /* Update dac-control register */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment