staging: comedi: pcmmio: cleanup ao_winsn()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 9 Dec 2013 22:30:47 +0000 (15:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2013 18:01:50 +0000 (10:01 -0800)
commit68533c7b8e87a907babab1da39652f1fa518697d
treec3e40c32f5f3e20d35a4d32dbc77b74c4971ad45
parenta81f87e9a08bae7a906a5cedae1ce100773c77df
staging: comedi: pcmmio: cleanup ao_winsn()

Rename this function to have namespace associated with the driver.

Refactor the function to remove the extra write to the command register
to set the range before writing the DAC value. Since the range is constant
for the entire comedi_insn it only needs to be set once. All writes to the
DAC after that will use the same range.

Define the register map for the analog output registers.

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