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

staging: comedi: aio_iiro_16: fix subdevice 1 'type'

Subdevice 1 is a digial input not a digital I/O subdevice.

Fix the type and, for aesthetics, rename the (*insn_bits) function used
to read the inputs.
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 3b78602f
......@@ -55,7 +55,7 @@ static int aio_iiro_16_do_insn_bits(struct comedi_device *dev,
return insn->n;
}
static int aio_iiro_16_dio_insn_bits_read(struct comedi_device *dev,
static int aio_iiro_16_di_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
......@@ -90,12 +90,12 @@ static int aio_iiro_16_attach(struct comedi_device *dev,
s->insn_bits = aio_iiro_16_do_insn_bits;
s = &dev->subdevices[1];
s->type = COMEDI_SUBD_DIO;
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE;
s->n_chan = 16;
s->maxdata = 1;
s->range_table = &range_digital;
s->insn_bits = aio_iiro_16_dio_insn_bits_read;
s->insn_bits = aio_iiro_16_di_insn_bits;
return 0;
}
......
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