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

staging: comedi: fl512: tidy up fl512_ao_insn_read()

For aesthetics, tidy up this function to match the style used in most
of the comedi drivers for analog output (*insn_read) functions.
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 8f28c9d9
...@@ -89,13 +89,13 @@ static int fl512_ao_insn_read(struct comedi_device *dev, ...@@ -89,13 +89,13 @@ static int fl512_ao_insn_read(struct comedi_device *dev,
unsigned int *data) unsigned int *data)
{ {
struct fl512_private *devpriv = dev->private; struct fl512_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++) for (i = 0; i < insn->n; i++)
data[n] = devpriv->ao_readback[chan]; data[i] = devpriv->ao_readback[chan];
return n; return insn->n;
} }
static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it) static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
......
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