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

staging: comedi: pcl818: remove unnecessary s->len_chanlist init

The subdevice 'len_chanlist' member is only used with async command
support. Remove the initialization of this member for the subdevices
that do not support commands. The core will then correctly initialize
it to the default value of '1'.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e4bfb085
...@@ -1333,7 +1333,6 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1333,7 +1333,6 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->subdev_flags = SDF_WRITABLE | SDF_GROUND; s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
s->n_chan = board->n_aochan; s->n_chan = board->n_aochan;
s->maxdata = board->ao_maxdata; s->maxdata = board->ao_maxdata;
s->len_chanlist = board->n_aochan;
s->range_table = board->ao_range_type; s->range_table = board->ao_range_type;
s->insn_read = pcl818_ao_insn_read; s->insn_read = pcl818_ao_insn_read;
s->insn_write = pcl818_ao_insn_write; s->insn_write = pcl818_ao_insn_write;
...@@ -1358,7 +1357,6 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1358,7 +1357,6 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->subdev_flags = SDF_READABLE; s->subdev_flags = SDF_READABLE;
s->n_chan = board->n_dichan; s->n_chan = board->n_dichan;
s->maxdata = 1; s->maxdata = 1;
s->len_chanlist = board->n_dichan;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = pcl818_di_insn_bits; s->insn_bits = pcl818_di_insn_bits;
} }
...@@ -1371,7 +1369,6 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1371,7 +1369,6 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->subdev_flags = SDF_WRITABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = board->n_dochan; s->n_chan = board->n_dochan;
s->maxdata = 1; s->maxdata = 1;
s->len_chanlist = board->n_dochan;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = pcl818_do_insn_bits; s->insn_bits = pcl818_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