diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-09-05 18:58:32 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-05 20:06:32 -0700 |
commit | bbea99d9c7221f69cadb4fd764f2a65e6292c756 (patch) | |
tree | 4360587f6239ce6dd4c32f8902509b56b30bce2f | |
parent | 4760904fb4a2841c9ac651e36610724929122385 (diff) |
staging: comedi: usbduxfast: remove subdevice pointer math
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>
-rw-r--r-- | drivers/staging/comedi/drivers/usbduxfast.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c index 8eb41257c6c..3f68fc39630 100644 --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c @@ -346,7 +346,7 @@ static void usbduxfastsub_ai_Irq(struct urb *urb) return; } /* 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) { @@ -1453,7 +1453,7 @@ static int usbduxfast_attach_common(struct comedi_device *dev, /* private structure is also simply the usb-structure */ dev->private = udfs; /* 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 |