From 630b713b2730dfede5f7ebe3273fae82d8c51bc6 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 5 Sep 2012 18:24:34 -0700 Subject: [PATCH] staging: comedi: adl_pci7296: 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 --- drivers/staging/comedi/drivers/adl_pci7296.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/adl_pci7296.c b/drivers/staging/comedi/drivers/adl_pci7296.c index 67233be8c7d6..96cfc9cd4a30 100644 --- a/drivers/staging/comedi/drivers/adl_pci7296.c +++ b/drivers/staging/comedi/drivers/adl_pci7296.c @@ -121,7 +121,7 @@ static int adl_pci7296_attach_pci(struct comedi_device *dev, return ret; for (i = 0; i < board->nsubdevs; i++) { - s = dev->subdevices + i; + s = &dev->subdevices[i]; ret = subdev_8255_init(dev, s, NULL, dev->iobase + (i * 4)); if (ret) return ret; @@ -142,7 +142,7 @@ static void adl_pci7296_detach(struct comedi_device *dev) if (dev->subdevices) { for (i = 0; i < board->nsubdevs; i++) { - s = dev->subdevices + i; + s = &dev->subdevices[i]; subdev_8255_cleanup(dev, s); } } -- 2.30.2