From: H Hartley Sweeten Date: Thu, 6 Sep 2012 01:46:26 +0000 (-0700) Subject: staging: comedi: mpc8260cpm: remove subdevice pointer math X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e49b26e779cce2a5e73b7433d9edcbd157f5a470;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: mpc8260cpm: remove subdevice pointer math Convert the comedi_subdevice access from pointer math to array access. Signed-off-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/mpc8260cpm.c b/drivers/staging/comedi/drivers/mpc8260cpm.c index a7fda8f01e8c..c0c33299b7f1 100644 --- a/drivers/staging/comedi/drivers/mpc8260cpm.c +++ b/drivers/staging/comedi/drivers/mpc8260cpm.c @@ -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;