staging: comedi: rtd520: use normal bitfield functions
authorIan Abbott <abbotti@mev.co.uk>
Thu, 17 Oct 2013 11:06:34 +0000 (12:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Oct 2013 20:45:54 +0000 (13:45 -0700)
commitf8d939e411f57a5facdfba66be2404f5ed238e30
treedb3b6ffa2cf7bd0c126f312e1bef51a59471fec1
parent0735e83c789d0d00052ba634262e7ffb09f38279
staging: comedi: rtd520: use normal bitfield functions

The `unsigned char chan_is_bipolar[]` member of `struct rtd_private` is
used with some macros as a packed array of 1-bit values that indicate
whether the corresponding entries in the hardware's "channel-gain" table
have been set to a bipolar (1) or unipolar (0) range, as the raw samples
from the hardware need to be cooked differently in each case.

Replace the declaration of the member with a standard Linux bitfield
using `DECLARE_BITFIELD()`, and replace the home-grown macros used
access the bitfield with the standard Linux non-atomic bitop functions,
`__set_bit()`, `__clear_bit()` and `test_bit()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/rtd520.c