For aesthetic reasons, move the call to comedi_alloc_subdevices()
so it occurs right before the subdevice init.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
inb(dev->iobase + RTI800_ADCHI);
outb(0, dev->iobase + RTI800_CLRFLAGS);
- ret = comedi_alloc_subdevices(dev, 4);
- if (ret)
- return ret;
-
devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
if (!devpriv)
return -ENOMEM;
devpriv->dac1_coding = it->options[8];
devpriv->muxgain_bits = -1;
+ ret = comedi_alloc_subdevices(dev, 4);
+ if (ret)
+ return ret;
+
s = &dev->subdevices[0];
/* ai subdevice */
s->type = COMEDI_SUBD_AI;