[PATCH 034/112] staging: comedi: cb_pcidio: remove subdevice pointer math

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/cb_pcidio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcidio.c b/drivers/staging/comedi/drivers/cb_pcidio.c
index 52c6379..9f406ef 100644
--- a/drivers/staging/comedi/drivers/cb_pcidio.c
+++ b/drivers/staging/comedi/drivers/cb_pcidio.c
@@ -119,7 +119,7 @@ static int pcidio_attach_pci(struct comedi_device *dev,
 		return ret;
 
 	for (i = 0; i < board->n_8255; i++) {
-		s = dev->subdevices + i;
+		s = &dev->subdevices[i];
 		ret = subdev_8255_init(dev, s, NULL, dev->iobase + i * 4);
 		if (ret)
 			return ret;
@@ -140,7 +140,7 @@ static void pcidio_detach(struct comedi_device *dev)
 
 	if (dev->subdevices) {
 		for (i = 0; i < board->n_8255; i++) {
-			s = dev->subdevices + i;
+			s = &dev->subdevices[i];
 			subdev_8255_cleanup(dev, s);
 		}
 	}
-- 
1.7.11

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux