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

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5c416ef3
......@@ -513,7 +513,6 @@ 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;
......@@ -521,9 +520,6 @@ static int das16cs_attach(struct comedi_device *dev,
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;
}
return 1;
}
......
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