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

staging: comedi: pcl711: tidy up pcl711_ao_insn_read()

Tidy up this function to follow the normal form in comedi drivers.
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 871b43ce
...@@ -431,17 +431,17 @@ static int pcl711_ao_insn_write(struct comedi_device *dev, ...@@ -431,17 +431,17 @@ static int pcl711_ao_insn_write(struct comedi_device *dev,
static int pcl711_ao_insn_read(struct comedi_device *dev, static int pcl711_ao_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data) struct comedi_insn *insn,
unsigned int *data)
{ {
struct pcl711_private *devpriv = dev->private; struct pcl711_private *devpriv = dev->private;
int n; unsigned int chan = CR_CHAN(insn->chanspec);
int chan = CR_CHAN(insn->chanspec); int i;
for (n = 0; n < insn->n; n++)
data[n] = devpriv->ao_readback[chan];
return n; for (i = 0; i < insn->n; i++)
data[i] = devpriv->ao_readback[chan];
return insn->n;
} }
/* Digital port read - Untested on 8112 */ /* Digital port read - Untested on 8112 */
......
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