mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 09:20:17 +00:00
staging: comedi: cb_das16_cs: cleanup dio subdevice initialization
The digital i/o subdevice is always initialized due to the 'if (1)'. Simplify the attach by removing the test. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5c416ef3f6
commit
f87a7e5bf5
@ -513,17 +513,13 @@ static int das16cs_attach(struct comedi_device *dev,
|
||||
|
||||
s = dev->subdevices + 2;
|
||||
/* digital i/o subdevice */
|
||||
if (1) {
|
||||
s->type = COMEDI_SUBD_DIO;
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
|
||||
s->n_chan = 8;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
s->insn_bits = das16cs_dio_insn_bits;
|
||||
s->insn_config = das16cs_dio_insn_config;
|
||||
} else {
|
||||
s->type = COMEDI_SUBD_UNUSED;
|
||||
}
|
||||
s->type = COMEDI_SUBD_DIO;
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
|
||||
s->n_chan = 8;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
s->insn_bits = das16cs_dio_insn_bits;
|
||||
s->insn_config = das16cs_dio_insn_config;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user