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)
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