staging: comedi: me_daq: cleanup me_dio_insn_bits()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Thu, 25 Oct 2012 22:11:23 +0000 (15:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Oct 2012 16:20:03 +0000 (09:20 -0700)
commitec6521a20431723ff4fa15fdefb386184075baa2
tree103afd7a5226bee1e1eb062cd1dcc57b1643a5bc
parent5e177c453f3dd9e43c7a407f46f8649c47a3614d
staging: comedi: me_daq: cleanup me_dio_insn_bits()

This function only needs to update the output channel state when
the 'mask' (data[0]) indicates that the state is changing. It's
also supposed to return the state for all the input and output
channels in data[1].

This function appears to work correctly but it's coded quite
differently form the other comedi drivers. Rework the function so
it follows the normal form. Also, use a couple local variables
for the mmio addresses used to read/write the dio ports.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/me_daq.c