aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/pcmuio.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-12-05 16:54:09 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-06 13:10:02 -0800
commitd3d2d75da52982968ddb25f715c86c65dde04903 (patch)
tree60cfa3dc5626a8663499785f52a16defc660b5dc /drivers/staging/comedi/drivers/pcmuio.c
parentstaging: comedi: pcmuio: fix pcmuio_dio_insn_bits() (diff)
downloadlinux-dev-d3d2d75da52982968ddb25f715c86c65dde04903.tar.xz
linux-dev-d3d2d75da52982968ddb25f715c86c65dde04903.zip
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: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/pcmuio.c')
-rw-r--r--drivers/staging/comedi/drivers/pcmuio.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c
index 2dca1199d175..3dbc1d3e1bdd 100644
--- a/drivers/staging/comedi/drivers/pcmuio.c
+++ b/drivers/staging/comedi/drivers/pcmuio.c
@@ -297,7 +297,6 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev,
unsigned oldevents = s->async->events;
unsigned int val = 0;
unsigned long flags;
- unsigned mytrig;
unsigned int i;
spin_lock_irqsave(&chip->spinlock, flags);
@@ -305,16 +304,13 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev,
if (!chip->active)
goto done;
- mytrig = triggered;
- mytrig &= ((0x1 << s->n_chan) - 1);
-
- if (!(mytrig & chip->enabled_mask))
+ if (!(triggered & chip->enabled_mask))
goto done;
for (i = 0; i < len; i++) {
unsigned int chan = CR_CHAN(s->async->cmd.chanlist[i]);
- if (mytrig & (1U << chan))
- val |= (1U << i);
+ if (triggered & (1 << chan))
+ val |= (1 << i);
}
/* Write the scan to the buffer. */