Skip to content
  • Ian Abbott's avatar
    staging: comedi: rtd520: use normal bitfield functions · f8d939e4
    Ian Abbott authored
    
    
    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: default avatarIan Abbott <abbotti@mev.co.uk>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    f8d939e4