]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit1c7388466f37d39fd8d5bff54d3c1e23c9a3474f
tree2a76c64b5da6959d20f99f60aff3f459df568104
parent59166e5b53639fab8d63ca8f68ea2049e0f149ee
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