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

index a7fda8f01e8ce113f6dda5d63c098e5576d24eff..c0c33299b7f1e7f09877bbd0aa0391c7bba5c7b7 100644 (file)
@@ -137,7 +137,7 @@ static int mpc8260cpm_attach(struct comedi_device *dev,
                return ret;
 
        for (i = 0; i < 4; i++) {
-               s = dev->subdevices + i;
+               s = &dev->subdevices[i];
                s->type = COMEDI_SUBD_DIO;
                s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
                s->n_chan = 32;