staging: comedi: usbdux: clarify bipolar ai data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 25 Jul 2013 23:04:17 +0000 (16:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2013 22:09:54 +0000 (15:09 -0700)
commit91891f7cc6453bec358a3bc2a0cf9a0b2f8223d5
tree593a4795b814c4b91d0c231b7e9d5f05e155a4e6
parenta79b4cdb52151dab5c5b2a86ab7619bc457470a8
staging: comedi: usbdux: clarify bipolar ai data

Use the comedi_range_is_bipolar() helper instead of checking the
'range' index against a magic number.

Also, use the s->maxdata to calculate the value needed to munge the
value for bipolar data instead of the magic number.

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/usbdux.c