staging: comedi: icp_multi: correct insn_bits returned data for DO
authorIan Abbott <abbotti@mev.co.uk>
Fri, 31 Oct 2014 14:32:27 +0000 (14:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Nov 2014 00:31:23 +0000 (16:31 -0800)
commitcf5d2af6839deb2e7765648ce139dc9677db0c18
tree9b6d2c9788491abac38d455d8ea827b0908416a8
parentc234566f776464594f6b73022497d4f5efd83e46
staging: comedi: icp_multi: correct insn_bits returned data for DO

For some unfathomable reason, the Comedi `insn_bits` handler for the
digital output subdevice (`icp_multi_insn_bits_do()`) writes the digital
output register and reads back the unrelated digital input register.
Read back the current state of the outputs (held in `s->state`) instead.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/icp_multi.c