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

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

staging: comedi: 8255: 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 5e4c58ce
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -403,7 +403,7 @@ static int dev_8255_attach(struct comedi_device *dev,
		return ret;

	for (i = 0; i < dev->n_subdevices; i++) {
		s = dev->subdevices + i;
		s = &dev->subdevices[i];
		iobase = it->options[i];

		if (!request_region(iobase, _8255_SIZE, "8255")) {
@@ -429,7 +429,7 @@ static void dev_8255_detach(struct comedi_device *dev)
	int i;

	for (i = 0; i < dev->n_subdevices; i++) {
		s = dev->subdevices + i;
		s = &dev->subdevices[i];
		if (s->type != COMEDI_SUBD_UNUSED) {
			spriv = s->private;
			release_region(spriv->iobase, _8255_SIZE);