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

index 017e33ea8b7c9807722ef8de3df001d9e65cc427..60830ccfb903f48fc9720490040d59bc113f0c5c 100644 (file)
@@ -225,7 +225,7 @@ static int pc263_common_attach(struct comedi_device *dev, unsigned long iobase)
        if (ret)
                return ret;
 
-       s = dev->subdevices + 0;
+       s = &dev->subdevices[0];
        /* digital output subdevice */
        s->type = COMEDI_SUBD_DO;
        s->subdev_flags = SDF_READABLE | SDF_WRITABLE;