staging: comedi: pcmad: use comedi_range_is_bipolar()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 28 Aug 2013 21:59:17 +0000 (14:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Sep 2013 14:47:40 +0000 (07:47 -0700)
Use the core provided helper function instead of duplicating it as
a private function.

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

index 423f23676d26cc1df6b8d91bf81a4691c9d0150d..fe482fdd512ed32f94af0987b236b2da28d62a57 100644 (file)
@@ -75,12 +75,6 @@ static int pcmad_ai_wait_for_eoc(struct comedi_device *dev,
        return -ETIME;
 }
 
-static bool pcmad_range_is_bipolar(struct comedi_subdevice *s,
-                                  unsigned int range)
-{
-       return s->range_table->range[range].min < 0;
-}
-
 static int pcmad_ai_insn_read(struct comedi_device *dev,
                              struct comedi_subdevice *s,
                              struct comedi_insn *insn,
@@ -106,7 +100,7 @@ static int pcmad_ai_insn_read(struct comedi_device *dev,
                if (s->maxdata == 0x0fff)
                        val >>= 4;
 
-               if (pcmad_range_is_bipolar(s, range)) {
+               if (comedi_range_is_bipolar(s, range)) {
                        /* munge the two's complement value */
                        val ^= ((s->maxdata + 1) >> 1);
                }
This page took 0.02556 seconds and 5 git commands to generate.