Skip to content
  • H Hartley Sweeten's avatar
    staging: comedi: s626: simplify dio register access · 100b4edc
    H Hartley Sweeten authored
    
    
    This driver has three dio subdevices, each with 16 channels. These
    subdevices use hardware registers that are spaced 0x10 bytes apart
    for each "group" of 16 channels.
    
    Create new macros to get the correct addresses for each register
    based on the dio "group". Use the s->private (void *) to hold the
    "group" number to use in the subdevice functions.
    
    This allows removing struct dio_private and all its uses. It also
    removes the ugly casts used to get the register address.
    
    Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
    Cc: Ian Abbott <abbotti@mev.co.uk>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    100b4edc