From: H Hartley Sweeten Date: Mon, 14 Jul 2014 19:23:43 +0000 (-0700) Subject: staging: comedi: ni_mio_common: fix ni_ao_insn_write() X-Git-Tag: omap-for-v3.17/fixes-against-rc2~166^2~689 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfb0c28ba03a46740c80848ba7b93fafb91de033;p=pandora-kernel.git staging: comedi: ni_mio_common: fix ni_ao_insn_write() Comedi (*insn_write) functions are expected to write insn->n values to the hardware. Fix this function to work like the core expects. Also, don't rely on the return value of ni_ao_comfig_chanlist() to determine if the values need converted to two's complement before writing to the hardware. Use the comedi_range_is_bipolar() and comedi_offset_munge() helpers to clarify the code. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed