• Andi Kleen's avatar
    sysfs: Add attribute array to sysdev classes · 38457ab3
    Andi Kleen authored
    Add a attribute array that is automatically registered and unregistered
    to struct sysdev_class. This is similar to what struct class has.
    
    A lot of drivers add list of attributes, so it's better to do 
    this easily in the common sysdev layer.
    
    This adds a new field to struct sysdev_class. I audited the 
    whole tree and there are no dynamically allocated sysdev classes,
    so this is fully compatible. 
    Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    
    38457ab3
sys.c 14.3 KB