staging: comedi: pcl711: tidy up pcl711_ao_insn()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 20 Sep 2013 23:38:09 +0000 (16:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Sep 2013 22:59:58 +0000 (15:59 -0700)
commit871b43cec94066cfbb457daa5f824de1f12330c0
treef066bfe8303ef43b3ca71b76b1ae93edb2be9a20
parent8509e6d8ec091c394cfeeae5dc1eaeaec640463c
staging: comedi: pcl711: tidy up pcl711_ao_insn()

For aesthetics, rename this function to help with greps.

Introduce a helper function to write the values to the analog
output channel registers. Modify the defines for the D/A registers
to avoid the ? : tests based on the chan number.

Only the final value written needs to be saved for read back.

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