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

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

staging: comedi: pcmmio: use comedi_cmd pointer



Use a local variable to access the comedi_cmd as a pointer instead
of getting to from the comedi_subdevice pointer.

Remove the unnecessary local variables used for the cmd->chanlist_len.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3516a5ef
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -339,8 +339,8 @@ static void pcmmio_handle_dio_intr(struct comedi_device *dev,
				   unsigned int triggered)
{
	struct pcmmio_private *devpriv = dev->private;
	struct comedi_cmd *cmd = &s->async->cmd;
	unsigned int oldevents = s->async->events;
	unsigned int len = s->async->cmd.chanlist_len;
	unsigned int val = 0;
	unsigned long flags;
	int i;
@@ -353,8 +353,8 @@ static void pcmmio_handle_dio_intr(struct comedi_device *dev,
	if (!(triggered & devpriv->enabled_mask))
		goto done;

	for (i = 0; i < len; i++) {
		unsigned int chan = CR_CHAN(s->async->cmd.chanlist[i]);
	for (i = 0; i < cmd->chanlist_len; i++) {
		unsigned int chan = CR_CHAN(cmd->chanlist[i]);

		if (triggered & (1 << chan))
			val |= (1 << i);