mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 11:33:36 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1c205ae18d
commit
38457ab3a0
@@ -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 *);
|
||||
|
||||
Reference in New Issue
Block a user