staging: comedi: ni_65xx: use the subdevice 'io_bits' to handle the 'invert_outputs'
Some of the boards supported by this driver have output ports that are
inverted from the comedi view of the output state. For these boards the
read values from the output ports needs to be inverted before being
modified and inverted again before being written back in the (*insn_bits)
operation.
Currently the subdevice type and the boardinfo is checked in the (*insn_bits)
to determine if the inverted outputs need to be handled.
Since thise driver does not use the subdevice 'io_bits', simplify the driver
a bit by initializing the 'io_bits' during the attach to handle the inversion.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 file changed