[PATCH 08/13] staging: comedi: pcmuio: remove unnecessary mask of triggered channels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/pcmuio.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c
index 5b0ade2..087911d 100644
--- a/drivers/staging/comedi/drivers/pcmuio.c
+++ b/drivers/staging/comedi/drivers/pcmuio.c
@@ -298,7 +298,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(&devpriv->asics[asic].spinlock, flags);
@@ -306,15 +305,12 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev,
 	if (!devpriv->asics[asic].active)
 		goto done;
 
-	mytrig = triggered;
-	mytrig &= ((0x1 << s->n_chan) - 1);
-
-	if (!(mytrig & devpriv->asics[asic].enabled_mask))
+	if (!(triggered & devpriv->asics[asic].enabled_mask))
 		goto done;
 
 	for (i = 0; i < len; i++) {
 		unsigned int chan = CR_CHAN(s->async->cmd.chanlist[i]);
-		if (mytrig & (1U << chan))
+		if (triggered & (1U << chan))
 			val |= (1U << i);
 	}
 
-- 
1.8.3.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux