1. 22 Dec, 2015 1 commit
    • Ian Abbott's avatar
      staging: comedi: s526: replace counter mode bitfield struct · 479bd5ed
      Ian Abbott authored
      The driver uses `struct counter_mode_register_t` to describe the 16-bit
      counter mode register as a sequence of bitfield members.  The struct
      appears as the type of one of the members of `union cmReg`, the other
      member of which is of type `unsigned short`, so the driver can
      manipulate the register value as a whole, or as individual fields.
      Although this is fairly convenient, it's not that conventional.  The
      code also needs to define the bitfield members in ascending or
      descending order of the physical bits, depending on whether bitfields
      are little- or big-endian.
      
      Rip all that out and replace it with a bunch of macros to set and mask
      out bits of the register value, as that's the more conventional way to
      do it.  A bonus is that we get rid of a load of CamelCase definitions in
      the process.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      479bd5ed
  2. 21 Dec, 2015 39 commits