From 38457ab3a0d36320370c715145ba6da514127194 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Tue, 5 Jan 2010 12:48:02 +0100 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- include/linux/sysdev.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/sysdev.h') diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index c2458fa8376c..b6244f9b533f 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h @@ -27,10 +27,12 @@ struct sys_device; +struct sysdev_class_attribute; struct sysdev_class { const char *name; struct list_head drivers; + struct sysdev_class_attribute **attrs; /* Default operations for these types of devices */ int (*shutdown)(struct sys_device *); -- cgit v1.2.3-59-g8ed1b