Skip to content

Commit

Permalink
staging: comedi: dt2814: 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 4ea4989 commit 92af10e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/dt2814.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ static irqreturn_t dt2814_interrupt(int irq, void *d)
return IRQ_HANDLED;
}

s = dev->subdevices + 0;
s = &dev->subdevices[0];

hi = inb(dev->iobase + DT2814_DATA);
lo = inb(dev->iobase + DT2814_DATA);
Expand Down Expand Up @@ -346,7 +346,7 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (ret < 0)
return ret;

s = dev->subdevices + 0;
s = &dev->subdevices[0];
dev->read_subdev = s;
s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_CMD_READ;
Expand Down

0 comments on commit 92af10e

Please sign in to comment.