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

staging: comedi: pcmmio: tidy up the ao subdevice init

Add some whitespace to the analog output subdevice init and reorder the
init to follow the "norm" in comedi drivers.

Remove the init of len_chanlist. This member is only used for subdevices
the support async commands. The core will default the value correctly.
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 7af64f9a
...@@ -1016,14 +1016,13 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1016,14 +1016,13 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
outb(0, outb(0,
dev->iobase + PCMMIO_AI_2ND_ADC_OFFSET + PCMMIO_AI_RESOURCE_REG); dev->iobase + PCMMIO_AI_2ND_ADC_OFFSET + PCMMIO_AI_RESOURCE_REG);
/* Next, AO */ /* Analog Output subdevice */
s = &dev->subdevices[1]; s = &dev->subdevices[1];
s->maxdata = 0xffff;
s->range_table = &pcmmio_ao_ranges;
s->subdev_flags = SDF_READABLE;
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_READABLE;
s->n_chan = 8; s->n_chan = 8;
s->len_chanlist = s->n_chan; s->maxdata = 0xffff;
s->range_table = &pcmmio_ao_ranges;
s->insn_read = pcmmio_ao_insn_read; s->insn_read = pcmmio_ao_insn_read;
s->insn_write = pcmmio_ao_insn_write; s->insn_write = pcmmio_ao_insn_write;
......
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