Skip to content

Commit

Permalink
staging: comedi: usbduxfast: remove subdevice pointer math
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 6, 2012
1 parent 4760904 commit bbea99d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/usbduxfast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bbea99d

Please sign in to comment.