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

staging: comedi: fl512: tidy up subdevice init

Remove the obvious comments and add some whitespace to the subdevice
init.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 268d1e79
...@@ -124,40 +124,24 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -124,40 +124,24 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (ret) if (ret)
return ret; return ret;
/* /* Analog Input subdevice */
* this if the definitions of the supdevices, 2 have been defined
*/
/* Analog indput */
s = &dev->subdevices[0]; s = &dev->subdevices[0];
/* define subdevice as Analog In */ s->type = COMEDI_SUBD_AI;
s->type = COMEDI_SUBD_AI; s->subdev_flags = SDF_READABLE | SDF_GROUND;
/* you can read it from userspace */ s->n_chan = 16;
s->subdev_flags = SDF_READABLE | SDF_GROUND; s->maxdata = 0x0fff;
/* Number of Analog input channels */ s->range_table = &range_fl512;
s->n_chan = 16; s->insn_read = fl512_ai_insn;
/* accept only 12 bits of data */
s->maxdata = 0x0fff; /* Analog Output subdevice */
/* device use one of the ranges */
s->range_table = &range_fl512;
/* function to call when read AD */
s->insn_read = fl512_ai_insn;
/* Analog output */
s = &dev->subdevices[1]; s = &dev->subdevices[1];
/* define subdevice as Analog OUT */ s->type = COMEDI_SUBD_AO;
s->type = COMEDI_SUBD_AO; s->subdev_flags = SDF_WRITABLE;
/* you can write it from userspace */ s->n_chan = 2;
s->subdev_flags = SDF_WRITABLE; s->maxdata = 0x0fff;
/* Number of Analog output channels */ s->range_table = &range_fl512;
s->n_chan = 2; s->insn_write = fl512_ao_insn;
/* accept only 12 bits of data */ s->insn_read = fl512_ao_insn_readback;
s->maxdata = 0x0fff;
/* device use one of the ranges */
s->range_table = &range_fl512;
/* function to call when write DA */
s->insn_write = fl512_ao_insn;
/* function to call when reading DA */
s->insn_read = fl512_ao_insn_readback;
return 0; return 0;
} }
......
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