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

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

staging: comedi: pcmuio: tidy up local variables in pcmuio_handle_intr_subdev()



Tidy up the local variables so that the comedi_cmd is accessed as a pointer
instead of getting to it from the comedi_subdevice pointer.

Remove the local variable 'len' and use the cmd->chanlist_len directly.

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 c2ccd69a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -317,7 +317,7 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev,
	struct pcmuio_private *devpriv = dev->private;
	int asic = pcmuio_subdevice_to_asic(s);
	struct pcmuio_asic *chip = &devpriv->asics[asic];
	unsigned int len = s->async->cmd.chanlist_len;
	struct comedi_cmd *cmd = &s->async->cmd;
	unsigned oldevents = s->async->events;
	unsigned int val = 0;
	unsigned long flags;
@@ -331,8 +331,8 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev,
	if (!(triggered & chip->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);
	}