]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: ni_mio_common: tidy up ni_ao_munge()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 14 Jul 2014 19:23:45 +0000 (12:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jul 2014 20:24:42 +0000 (13:24 -0700)
commit7b955f2519ab34f3b7a88e1e1d09f53858bf53a1
treefb348d8140c4cd254f7c33e9aa6deea7efd7cbd9
parentf19087d113c5234d3cac1cbefab3c244dcb32ed0
staging: comedi: ni_mio_common: tidy up ni_ao_munge()

Use the bytes_per_sample() helper instead of 'sizeof(short)' to clarify
the length calculation.

Use comedi_offset_munge() to handle the unsigned to two's complement
munge of the data for bipolar ranges.

Tidy up the local variables.

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