Skip to content

Commit

Permalink
staging: comedi: pcl725: 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 d533ef0 commit 7d78055
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/pcl725.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static int pcl725_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (ret)
return ret;

s = dev->subdevices + 0;
s = &dev->subdevices[0];
/* do */
s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITABLE;
Expand All @@ -71,7 +71,7 @@ static int pcl725_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->insn_bits = pcl725_do_insn;
s->range_table = &range_digital;

s = dev->subdevices + 1;
s = &dev->subdevices[1];
/* di */
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE;
Expand Down

0 comments on commit 7d78055

Please sign in to comment.