]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: ni_at_ao: tidy up atao_ao_winsn()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 1 Oct 2013 00:54:08 +0000 (17:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Oct 2013 21:04:50 +0000 (14:04 -0700)
commit0b14f9a3ccdc49eeed8859a6d804ac66880fd3c7
treea0e120cd90755fb77b97819e9a886ed482819382
parent85f460183147f58be634d011c599060ee75b3fcc
staging: comedi: ni_at_ao: tidy up atao_ao_winsn()

For aesthetics, rename this function to help with greps.

For channel 0, register group 1 only needs to be selected before
writing the values and restored to group 0 when the writes are
finished. Move the code out of the for () loop.

Use the comedi_ffset_munge() helper to handle the offset binary to
two's complement munging.

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_at_ao.c