From: H Hartley Sweeten Date: Thu, 6 Sep 2012 01:42:42 +0000 (-0700) Subject: staging: comedi: fl512: remove subdevice pointer math X-Git-Tag: v3.7-rc1~173^2~616 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6fc01d32a2b9e0ac2879e69b2d15caf4ad50c5f7;p=profile%2Fivi%2Fkernel-x86-ivi.git staging: comedi: fl512: 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/fl512.c b/drivers/staging/comedi/drivers/fl512.c index d1da809..ae8e8f4 100644 --- a/drivers/staging/comedi/drivers/fl512.c +++ b/drivers/staging/comedi/drivers/fl512.c @@ -140,7 +140,7 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it) * this if the definitions of the supdevices, 2 have been defined */ /* Analog indput */ - s = dev->subdevices + 0; + s = &dev->subdevices[0]; /* define subdevice as Analog In */ s->type = COMEDI_SUBD_AI; /* you can read it from userspace */ @@ -156,7 +156,7 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it) printk(KERN_INFO "comedi: fl512: subdevice 0 initialized\n"); /* Analog output */ - s = dev->subdevices + 1; + s = &dev->subdevices[1]; /* define subdevice as Analog OUT */ s->type = COMEDI_SUBD_AO; /* you can write it from userspace */