/* the private structure of the subdevice is struct usbduxsub */
this_usbduxsub = this_comedidev->private;
/* subdevice which is the AD converter */
- s = this_comedidev->subdevices + SUBDEV_AD;
+ s = &this_comedidev->subdevices[SUBDEV_AD];
/* first we test if something unusual has just happened */
switch (urb->status) {
/* the private structure of the subdevice is struct usbduxsub */
this_usbduxsub = this_comedidev->private;
- s = this_comedidev->subdevices + SUBDEV_DA;
+ s = &this_comedidev->subdevices[SUBDEV_DA];
switch (urb->status) {
case 0:
/* the private structure of the subdevice is struct usbduxsub */
this_usbduxsub = this_comedidev->private;
- s = this_comedidev->subdevices + SUBDEV_DA;
+ s = &this_comedidev->subdevices[SUBDEV_DA];
switch (urb->status) {
case 0:
dev->private = udev;
/* the first subdevice is the A/D converter */
- s = dev->subdevices + SUBDEV_AD;
+ s = &dev->subdevices[SUBDEV_AD];
/* the URBs get the comedi subdevice */
/* which is responsible for reading */
/* this is the subdevice which reads data */
s->range_table = (&range_usbdux_ai_range);
/* analog out */
- s = dev->subdevices + SUBDEV_DA;
+ s = &dev->subdevices[SUBDEV_DA];
/* analog out */
s->type = COMEDI_SUBD_AO;
/* backward pointer */
s->insn_write = usbdux_ao_insn_write;
/* digital I/O */
- s = dev->subdevices + SUBDEV_DIO;
+ s = &dev->subdevices[SUBDEV_DIO];
s->type = COMEDI_SUBD_DIO;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
s->n_chan = 8;
s->private = NULL;
/* counter */
- s = dev->subdevices + SUBDEV_COUNTER;
+ s = &dev->subdevices[SUBDEV_COUNTER];
s->type = COMEDI_SUBD_COUNTER;
s->subdev_flags = SDF_WRITABLE | SDF_READABLE;
s->n_chan = 4;
if (udev->high_speed) {
/* timer / pwm */
- s = dev->subdevices + SUBDEV_PWM;
+ s = &dev->subdevices[SUBDEV_PWM];
s->type = COMEDI_SUBD_PWM;
s->subdev_flags = SDF_WRITABLE | SDF_PWM_HBRIDGE;
s->n_chan = 8;