staging: comedi: usbdux: clarify bipolar ai data in usbduxsub_ai_isoc_irq()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 25 Jul 2013 23:09:30 +0000 (16:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2013 22:10:07 +0000 (15:10 -0700)
commit7acf26edbcba808cb6447af893f30c63751938f8
tree0433cf852e85c1489f07b760a51c5b118bd939bc
parent1731a826cad3a71062b00c80abca4f887d57e501
staging: comedi: usbdux: clarify bipolar ai data in usbduxsub_ai_isoc_irq()

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