staging: comedi: das800: tidy up das800_do_insn_bits()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 23 Apr 2013 01:36:28 +0000 (18:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Apr 2013 17:41:51 +0000 (10:41 -0700)
commit26234771c1a53b0a3bf69c161d79cd37c77ebd1a
tree2a76c64b5da6959d20f99f60aff3f459df568104
parent264601c231c9c9dec3da2c665c0b9cbec11d8c9e
staging: comedi: das800: tidy up das800_do_insn_bits()

Use a couple local variables, mask and bits, to clarify this function.

Its only necessary to update the outputs if the mask indicates that
the bits are changing. Modify this function accordingly. Also, use
the subdevice 'state' variable to hold the actual output channel
state instead of needing to get it from the private data and shift
it.

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/das800.c