[PATCH 11/15] staging: comedi: ni_daq_700: tidy up the subdevice init
H Hartley Sweeten
hsweeten at visionengravers.com
Tue Jul 15 00:21:08 UTC 2014
For aesthetics, add some white space to the subdevice init and tidy
it up a bit.
Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregk at linuxfoundation.org>
---
drivers/staging/comedi/drivers/ni_daq_700.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c
index 0be7312..2b4d4e6 100644
--- a/drivers/staging/comedi/drivers/ni_daq_700.c
+++ b/drivers/staging/comedi/drivers/ni_daq_700.c
@@ -275,25 +275,25 @@ static int daq700_auto_attach(struct comedi_device *dev,
if (ret)
return ret;
- /* DAQCard-700 dio */
+ /* Digital Input/Output subdevice */
s = &dev->subdevices[0];
s->type = COMEDI_SUBD_DIO;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
s->n_chan = 16;
- s->range_table = &range_digital;
s->maxdata = 1;
+ s->range_table = &range_digital;
s->insn_bits = daq700_dio_insn_bits;
s->insn_config = daq700_dio_insn_config;
- s->io_bits = 0x00ff;
+ s->io_bits = 0x00ff; /* direction is fixed */
- /* DAQCard-700 ai */
+ /* Analog Input subdevice */
s = &dev->subdevices[1];
- s->type = COMEDI_SUBD_AI;
- s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_DIFF;
- s->n_chan = 16;
- s->maxdata = (1 << 12) - 1;
- s->range_table = &range_daq700_ai;
- s->insn_read = daq700_ai_insn_read;
+ s->type = COMEDI_SUBD_AI;
+ s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_DIFF;
+ s->n_chan = 16;
+ s->maxdata = 0x0fff;
+ s->range_table = &range_daq700_ai;
+ s->insn_read = daq700_ai_insn_read;
daq700_initialize(dev);
--
1.9.3
More information about the devel
mailing list