diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-28 23:34:53 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-18 21:34:44 (GMT) |
commit | 521a0a6c44c1de93a18a2078d546aa0546983089 (patch) | |
tree | 6891cd365a668ea50d0d8f65f0b4092e43538183 /drivers | |
parent | 11c4e2db8ef149e36471f4bbb3c296b48533f28f (diff) | |
download | linux-521a0a6c44c1de93a18a2078d546aa0546983089.tar.xz |
staging: comedi: adq12b: tidy up the subdevice init
For aesthetics, add some whitespace to the subdevice init.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/adq12b.c | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c index 10f3486..2e36aee 100644 --- a/drivers/staging/comedi/drivers/adq12b.c +++ b/drivers/staging/comedi/drivers/adq12b.c @@ -220,40 +220,38 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it) if (ret) return ret; + /* Analog Input subdevice */ s = &dev->subdevices[0]; - /* analog input subdevice */ - s->type = COMEDI_SUBD_AI; + s->type = COMEDI_SUBD_AI; if (it->options[2]) { - s->subdev_flags = SDF_READABLE | SDF_DIFF; - s->n_chan = 8; + s->subdev_flags = SDF_READABLE | SDF_DIFF; + s->n_chan = 8; } else { - s->subdev_flags = SDF_READABLE | SDF_GROUND; - s->n_chan = 16; + s->subdev_flags = SDF_READABLE | SDF_GROUND; + s->n_chan = 16; } + s->maxdata = 0xfff; + s->range_table = it->options[1] ? &range_adq12b_ai_unipolar + : &range_adq12b_ai_bipolar; + s->insn_read = adq12b_ai_insn_read; - s->range_table = it->options[1] ? &range_adq12b_ai_unipolar - : &range_adq12b_ai_bipolar; - - s->maxdata = 0xfff; - s->insn_read = adq12b_ai_insn_read; - + /* Digital Input subdevice */ s = &dev->subdevices[1]; - /* digital input subdevice */ - s->type = COMEDI_SUBD_DI; - s->subdev_flags = SDF_READABLE; - s->n_chan = 5; - s->maxdata = 1; - s->range_table = &range_digital; - s->insn_bits = adq12b_di_insn_bits; - + s->type = COMEDI_SUBD_DI; + s->subdev_flags = SDF_READABLE; + s->n_chan = 5; + s->maxdata = 1; + s->range_table = &range_digital; + s->insn_bits = adq12b_di_insn_bits; + + /* Digital Output subdevice */ s = &dev->subdevices[2]; - /* digital output subdevice */ - s->type = COMEDI_SUBD_DO; - s->subdev_flags = SDF_WRITABLE; - s->n_chan = 8; - s->maxdata = 1; - s->range_table = &range_digital; - s->insn_bits = adq12b_do_insn_bits; + s->type = COMEDI_SUBD_DO; + s->subdev_flags = SDF_WRITABLE; + s->n_chan = 8; + s->maxdata = 1; + s->range_table = &range_digital; + s->insn_bits = adq12b_do_insn_bits; return 0; } |