提交 f87a7e5b 编写于 作者: H H Hartley Sweeten 提交者: 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: NH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5c416ef3
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册