diff options
author | Andi Kleen <andi@firstfloor.org> | 2010-01-05 06:48:05 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-07 20:04:47 -0500 |
commit | 1e395ab3d9b6aa09c5f0aa46a1b0a6fc5bd33133 (patch) | |
tree | db492ef9a79ecf4caf314a87dcf66a2174fe37b6 | |
parent | 3701cde6e35245e26f63252f46c62e8a790fa996 (diff) |
sysdev: Add sysdev_create/remove_files
Allow to create/remove arrays of sysdev attributes
Just wrappers around sysfs_create/move_files
Will be used later to clean up some drivers.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | include/linux/sysdev.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index b6244f9b533f..1154c29f4101 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -123,6 +123,19 @@ struct sysdev_attribute { | |||
123 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); | 123 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); |
124 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); | 124 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); |
125 | 125 | ||
126 | /* Create/remove NULL terminated attribute list */ | ||
127 | static inline int | ||
128 | sysdev_create_files(struct sys_device *d, struct sysdev_attribute **a) | ||
129 | { | ||
130 | return sysfs_create_files(&d->kobj, (const struct attribute **)a); | ||
131 | } | ||
132 | |||
133 | static inline void | ||
134 | sysdev_remove_files(struct sys_device *d, struct sysdev_attribute **a) | ||
135 | { | ||
136 | return sysfs_remove_files(&d->kobj, (const struct attribute **)a); | ||
137 | } | ||
138 | |||
126 | struct sysdev_ext_attribute { | 139 | struct sysdev_ext_attribute { |
127 | struct sysdev_attribute attr; | 140 | struct sysdev_attribute attr; |
128 | void *var; | 141 | void *var; |