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

staging: comedi: ni_at_ao: tidy up atao_ao_rinsn()

For aesthetics, rename this function to help with greps.

Tidy up this function to follow the normal format for analog
output read back 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 8305aac3
......@@ -163,17 +163,19 @@ static int atao_ao_insn_write(struct comedi_device *dev,
return insn->n;
}
static int atao_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
static int atao_ao_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
struct atao_private *devpriv = dev->private;
unsigned int chan = CR_CHAN(insn->chanspec);
int i;
int chan = CR_CHAN(insn->chanspec);
for (i = 0; i < insn->n; i++)
data[i] = devpriv->ao_readback[chan];
return i;
return insn->n;
}
static int atao_dio_insn_bits(struct comedi_device *dev,
......@@ -366,7 +368,7 @@ static int atao_attach(struct comedi_device *dev, struct comedi_devconfig *it)
else
s->range_table = &range_bipolar10;
s->insn_write = atao_ao_insn_write;
s->insn_read = &atao_ao_rinsn;
s->insn_read = atao_ao_insn_read;
s = &dev->subdevices[1];
/* digital i/o subdevice */
......
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