Commit d3d2d75d authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcmuio: remove unnecessary mask of triggered channels

The 'triggered' value is read directly from the three trigger id
registers and does not have any extra data that needs masked off.
Remove the 'mytrig' local variable and just use 'triggered' directly.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent beecd01b
...@@ -297,7 +297,6 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev, ...@@ -297,7 +297,6 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev,
unsigned oldevents = s->async->events; unsigned oldevents = s->async->events;
unsigned int val = 0; unsigned int val = 0;
unsigned long flags; unsigned long flags;
unsigned mytrig;
unsigned int i; unsigned int i;
spin_lock_irqsave(&chip->spinlock, flags); spin_lock_irqsave(&chip->spinlock, flags);
...@@ -305,16 +304,13 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev, ...@@ -305,16 +304,13 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev,
if (!chip->active) if (!chip->active)
goto done; goto done;
mytrig = triggered; if (!(triggered & chip->enabled_mask))
mytrig &= ((0x1 << s->n_chan) - 1);
if (!(mytrig & chip->enabled_mask))
goto done; goto done;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
unsigned int chan = CR_CHAN(s->async->cmd.chanlist[i]); unsigned int chan = CR_CHAN(s->async->cmd.chanlist[i]);
if (mytrig & (1U << chan)) if (triggered & (1 << chan))
val |= (1U << i); val |= (1 << i);
} }
/* Write the scan to the buffer. */ /* Write the scan to the buffer. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment