staging: comedi: ni_65xx: use the subdevice 'io_bits' to handle the 'invert_outputs'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 14 Jul 2014 19:07:06 +0000 (12:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jul 2014 20:22:51 +0000 (13:22 -0700)
commit800453dc5cabcc0f1bb2a185ca2df9bcf01fa142
tree814e456349a5a08225b0cad3e119dd3e42f92da1
parent5c70b5360b539f9b177bd02e0b3b88345116ee52
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>
drivers/staging/comedi/drivers/ni_65xx.c
This page took 0.024618 seconds and 5 git commands to generate.