[PATCH 07/13] staging: comedi: mf6x4: remove unnecassary masking of digital outputs

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

 



THe 's->state' will always be in range for the 8 digital outputs.
Remove the unnecessary masking of the value.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/mf6x4.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/mf6x4.c b/drivers/staging/comedi/drivers/mf6x4.c
index 1e4f080..03f81e9 100644
--- a/drivers/staging/comedi/drivers/mf6x4.c
+++ b/drivers/staging/comedi/drivers/mf6x4.c
@@ -43,8 +43,7 @@
 #define MF6X4_ADCTRL_CHAN(x)	BIT(chan)
 #define MF6X4_DIN_R		0x10
 #define MF6X4_DIN_M		0xff
-#define MF6X4_DOUT_R		0x10
-#define MF6X4_DOUT_M		0xff
+#define MF6X4_DOUT_REG		0x10
 #define MF6X4_ADSTART_R		0x20
 #define MF6X4_DAC_R(x)		(0x20 + ((x) * 2))
 
@@ -107,7 +106,7 @@ static int mf6x4_do_insn_bits(struct comedi_device *dev,
 			      unsigned int *data)
 {
 	if (comedi_dio_update_state(s, data))
-		iowrite16(s->state & MF6X4_DOUT_M, dev->mmio + MF6X4_DOUT_R);
+		iowrite16(s->state, dev->mmio + MF6X4_DOUT_REG);
 
 	data[1] = s->state;
 
-- 
2.5.1

_______________________________________________
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