Convert the comedi_subdevice access from pointer math to array
access.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (ret)
return ret;
- s = dev->subdevices + 0;
+ s = &dev->subdevices[0];
dev->read_subdev = s;
/* analog input subdevice */
s->type = COMEDI_SUBD_AI;
s->do_cmdtest = waveform_ai_cmdtest;
s->cancel = waveform_ai_cancel;
- s = dev->subdevices + 1;
+ s = &dev->subdevices[1];
dev->write_subdev = s;
/* analog output subdevice (loopback) */
s->type = COMEDI_SUBD_AO;