Commit 4138b1d4 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: dyna_pci10xx: Don't bother configuring len_chanlist

In the Comedi "attach" and "auto_attach" handlers that set up the Comedi
subdevices, there is no need to initialize the `len_chanlist` member of
Comedi subdevices that do not support Comedi asynchronous streaming
commands.  They can be left set to the initial zeroed out value and
the Comedi core will change the `len_chanlist` member to 1 afterwards in
that case.  The "dyna_pci10xx" driver currently sets the `len_chanlist`
members to the same value as the `n_chan` ("number of channels") member,
but this is unnecessary as none of them support asynchronous streaming.
Remove the initialization of `len_chanlist` from all the subdevices.
This will affect the information reported by the COMEDI_SUBDINFO ioctl
slightly.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1598475c
...@@ -190,7 +190,6 @@ static int dyna_pci10xx_auto_attach(struct comedi_device *dev, ...@@ -190,7 +190,6 @@ static int dyna_pci10xx_auto_attach(struct comedi_device *dev,
s->n_chan = 16; s->n_chan = 16;
s->maxdata = 0x0FFF; s->maxdata = 0x0FFF;
s->range_table = &range_pci1050_ai; s->range_table = &range_pci1050_ai;
s->len_chanlist = 16;
s->insn_read = dyna_pci10xx_insn_read_ai; s->insn_read = dyna_pci10xx_insn_read_ai;
/* analog output */ /* analog output */
...@@ -200,7 +199,6 @@ static int dyna_pci10xx_auto_attach(struct comedi_device *dev, ...@@ -200,7 +199,6 @@ static int dyna_pci10xx_auto_attach(struct comedi_device *dev,
s->n_chan = 16; s->n_chan = 16;
s->maxdata = 0x0FFF; s->maxdata = 0x0FFF;
s->range_table = &range_unipolar10; s->range_table = &range_unipolar10;
s->len_chanlist = 16;
s->insn_write = dyna_pci10xx_insn_write_ao; s->insn_write = dyna_pci10xx_insn_write_ao;
/* digital input */ /* digital input */
...@@ -210,7 +208,6 @@ static int dyna_pci10xx_auto_attach(struct comedi_device *dev, ...@@ -210,7 +208,6 @@ static int dyna_pci10xx_auto_attach(struct comedi_device *dev,
s->n_chan = 16; s->n_chan = 16;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->len_chanlist = 16;
s->insn_bits = dyna_pci10xx_di_insn_bits; s->insn_bits = dyna_pci10xx_di_insn_bits;
/* digital output */ /* digital output */
...@@ -220,7 +217,6 @@ static int dyna_pci10xx_auto_attach(struct comedi_device *dev, ...@@ -220,7 +217,6 @@ static int dyna_pci10xx_auto_attach(struct comedi_device *dev,
s->n_chan = 16; s->n_chan = 16;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->len_chanlist = 16;
s->state = 0; s->state = 0;
s->insn_bits = dyna_pci10xx_do_insn_bits; s->insn_bits = dyna_pci10xx_do_insn_bits;
......
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