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

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

staging: comedi: comedi_test: 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 9da5ae29
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -453,7 +453,7 @@ static int waveform_attach(struct comedi_device *dev,
	if (ret)
		return ret;

	s = dev->subdevices + 0;
	s = &dev->subdevices[0];
	dev->read_subdev = s;
	/* analog input subdevice */
	s->type = COMEDI_SUBD_AI;
@@ -467,7 +467,7 @@ static int waveform_attach(struct comedi_device *dev,
	s->do_cmdtest = waveform_ai_cmdtest;
	s->cancel = waveform_ai_cancel;

	s = dev->subdevices + 1;
	s = &dev->subdevices[1];
	dev->write_subdev = s;
	/* analog output subdevice (loopback) */
	s->type = COMEDI_SUBD_AO;