Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 630b713b authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: adl_pci7296: remove subdevice pointer math



Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1f6115a4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
		}
	}