[PATCH 06/11] staging: comedi: core: only update outputs with comedi_dio_insn_bits()

H Hartley Sweeten hsweeten at visionengravers.com
Wed Aug 28 20:29:27 UTC 2013


Make sure only the state of the channels configured as outputs is updated
by comedi_dio_insn_bits().

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/comedi/drivers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index 7477514..8d8bf22 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -202,7 +202,7 @@ int comedi_dio_insn_bits(struct comedi_device *dev,
 			 struct comedi_insn *insn,
 			 unsigned int *data)
 {
-	unsigned int mask = data[0];
+	unsigned int mask = data[0] & s->io_bits;	/* outputs only */
 	unsigned int bits = data[1];
 
 	if (mask) {
-- 
1.8.3.2



More information about the devel mailing list