• Patrick Mochel's avatar
    [Driver Model] Add default attributes for classes class devices. · 0d1c76a0
    Patrick Mochel authored
    - add struct class::class_attrs, which is designed to point to an 
      array of class_attributes that are added when the class is registered
      and removed when the class is unregistered. 
      This allows for more consolidated and cleaner definition of and
      management of attributes.
    
    - Add struct class::class_dev_attrs to do something similarly for 
      class devices. Each class device that is registered with the class
      gets that set of attributes added for them, and subsequently removed
      when the device is unregistered.
    
    Each array depends on a terminating attribute with a NULL name. Hint:
    use the new __ATTR_NULL macro to terminate it.
    0d1c76a0
class.c 12.4 KB