staging: comedi: ni_mio_common: fix ni_ao_insn_write_671x()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 14 Jul 2014 19:23:41 +0000 (12:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jul 2014 20:24:41 +0000 (13:24 -0700)
commit093b6968857eb47493b955989ae62bb857648117
treeddd515b644e2b3bef13c40dd1b9f2bf40dab8a4c
parentfed3c23b5e3c56e358e751418d7310b9c8e926cc
staging: comedi: ni_mio_common: fix ni_ao_insn_write_671x()

Comedi (*insn_write) functions are expected to write insn->n values to
the hardware. Fix this function to work like the core expects.

Also, use the comedi_offset_munge() helper to convert the comedi unsigned
values into the two's complement values that the hardware needs.

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