]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: multiq3: tidy up multiq3_ai_insn_read()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 5 Oct 2015 22:33:08 +0000 (15:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 04:18:33 +0000 (21:18 -0700)
commit94fe7311ae9eda9e724f6aa65d51dc6d6a948fc6
tree6e026ea3f20e03acbea2df3b0d5298d2af609d85
parent2f4a5dc31942dc5ebb8a2ffd62d630c880f51bb4
staging: comedi: multiq3: tidy up multiq3_ai_insn_read()

For aesthetics, use the proper symbol when reading the A/D data register
to get the 16-bit sample data.

Use the comedi_offset_munge() to do the 2's complement to offset binary
munging of the sample data.

Tidy up the function a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/multiq3.c