staging: comedi: pcl725: remove subdevice pointer math
authorH Hartley Sweeten <hartleys@visionengravers.com>
Thu, 6 Sep 2012 01:51:38 +0000 (18:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Sep 2012 03:06:29 +0000 (20:06 -0700)
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>
drivers/staging/comedi/drivers/pcl725.c

index d5b60cf7c93f33b8283fc60f6d26ecc379cc28c3..21fbc1ae1e73ceca01bbeddacaff58c8cb0f346c 100644 (file)
@@ -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;
@@ -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;