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)
commita10817d67f34546401f6733badd427c9decf88e8
treefb348d8140c4cd254f7c33e9aa6deea7efd7cbd9
parenta52b53e4a743988667e5db7cd0de1cdb0732b4f9
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