]> bbs.cooldavid.org Git - net-next-2.6.git/commit
sysfs: Add attribute array to sysdev classes
authorAndi Kleen <andi@firstfloor.org>
Tue, 5 Jan 2010 11:48:02 +0000 (12:48 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 8 Mar 2010 01:04:47 +0000 (17:04 -0800)
commit38457ab3a0d36320370c715145ba6da514127194
tree0c3f729c450b18b439dc6ce7a1542d9e8d3dd8e3
parent1c205ae18db53ff72985dd79f3baaf2dbaba6db7
sysfs: Add attribute array to sysdev classes

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: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/sys.c
include/linux/sysdev.h