Skip to content

Commit

Permalink
staging: comedi: das6402: 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 2e3d3cf commit 92cfef5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/das6402.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static void das6402_setcounter(struct comedi_device *dev)
static irqreturn_t intr_handler(int irq, void *d)
{
struct comedi_device *dev = d;
struct comedi_subdevice *s = dev->subdevices;
struct comedi_subdevice *s = &dev->subdevices[0];

if (!dev->attached || devpriv->das6402_ignoreirq) {
dev_warn(dev->class_dev, "BUG: spurious interrupt\n");
Expand Down Expand Up @@ -312,7 +312,7 @@ static int das6402_attach(struct comedi_device *dev,
return ret;

/* ai subdevice */
s = dev->subdevices + 0;
s = &dev->subdevices[0];
s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | SDF_GROUND;
s->n_chan = 8;
Expand Down

0 comments on commit 92cfef5

Please sign in to comment.