mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 10:11:52 -04:00
staging: comedi: pcl812: 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: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6464e2ff43
commit
e5fc1a1925
@@ -1305,7 +1305,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
|
||||
s->n_chan = board->n_aochan;
|
||||
s->maxdata = 0xfff;
|
||||
s->len_chanlist = 1;
|
||||
s->range_table = board->rangelist_ao;
|
||||
s->insn_read = pcl812_ao_insn_read;
|
||||
s->insn_write = pcl812_ao_insn_write;
|
||||
@@ -1334,7 +1333,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
s->subdev_flags = SDF_READABLE;
|
||||
s->n_chan = board->n_dichan;
|
||||
s->maxdata = 1;
|
||||
s->len_chanlist = board->n_dichan;
|
||||
s->range_table = &range_digital;
|
||||
s->insn_bits = pcl812_di_insn_bits;
|
||||
subdev++;
|
||||
@@ -1347,7 +1345,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = board->n_dochan;
|
||||
s->maxdata = 1;
|
||||
s->len_chanlist = board->n_dochan;
|
||||
s->range_table = &range_digital;
|
||||
s->insn_bits = pcl812_do_insn_bits;
|
||||
subdev++;
|
||||
|
||||
Reference in New Issue
Block a user