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

staging: comedi: usbduxfast: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4760904f
...@@ -346,7 +346,7 @@ static void usbduxfastsub_ai_Irq(struct urb *urb) ...@@ -346,7 +346,7 @@ static void usbduxfastsub_ai_Irq(struct urb *urb)
return; return;
} }
/* subdevice which is the AD converter */ /* 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 */ /* first we test if something unusual has just happened */
switch (urb->status) { switch (urb->status) {
...@@ -1453,7 +1453,7 @@ static int usbduxfast_attach_common(struct comedi_device *dev, ...@@ -1453,7 +1453,7 @@ static int usbduxfast_attach_common(struct comedi_device *dev,
/* private structure is also simply the usb-structure */ /* private structure is also simply the usb-structure */
dev->private = udfs; dev->private = udfs;
/* the first subdevice is the A/D converter */ /* 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 * the URBs get the comedi subdevice which is responsible for reading
* this is the subdevice which reads data * this is the subdevice which reads data
......
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