]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: amplc_pci230: use comedi_range_is_bipolar()
authorIan Abbott <abbotti@mev.co.uk>
Mon, 1 Sep 2014 11:03:51 +0000 (12:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Sep 2014 18:21:32 +0000 (11:21 -0700)
commit2cd5da05b0ea4bf178fab718d42de5a386600991
tree173897480c33dc675c76306103459222951439d9
parent14c289d896d31903b04656701464de46ffb197c5
staging: comedi: amplc_pci230: use comedi_range_is_bipolar()

Use the inline `comedi_range_is_bipolar()` function from "comedidev.h"
to decide whether a range is bipolar or unipolar instead of using the
local static arrays `pci230_ai_bipolar[]` and `pci230_ao_bipolar[]`
which can then be removed.

Change the types of the `ai_bipolar` and `ao_bipolar` members of `struct
pci230_private` to `bool` to match the return value of
`comedi_range_is_bipolar()` and change them into single-bit bitfields to
save a bit of space.  Also change the type and name of some local
variables in `pci230_ai_check_chanlist()` that hold the result of
`comedi_range_is_bipolar()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/amplc_pci230.c