From: H Hartley Sweeten Date: Wed, 28 Aug 2013 21:59:17 +0000 (-0700) Subject: staging: comedi: pcmad: use comedi_range_is_bipolar() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=43db70a50737d9044017731d65d19ec1ef0926e5;p=deliverable%2Flinux.git staging: comedi: pcmad: use comedi_range_is_bipolar() Use the core provided helper function instead of duplicating it as a private function. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/pcmad.c b/drivers/staging/comedi/drivers/pcmad.c index 423f23676d26..fe482fdd512e 100644 --- a/drivers/staging/comedi/drivers/pcmad.c +++ b/drivers/staging/comedi/drivers/pcmad.c @@ -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); }