diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-02-20 15:02:44 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-23 18:03:46 -0500 |
commit | dfa87c824a9a5430008acd1ed2e8111ed164fcbe (patch) | |
tree | 1e25c9d6a00b409e3cd6a7d304fe2b98eb955309 /include/linux/sysfs.h | |
parent | b5e795f8df42936590ba9c606edc715fe3593284 (diff) |
sysfs: allow attributes to be added to groups
This patch (as860) adds two new sysfs routines:
sysfs_add_file_to_group() and sysfs_remove_file_from_group().
A later patch adds code that uses the new routines.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r-- | include/linux/sysfs.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 192de3afa96b..f45450b295c0 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -126,6 +126,11 @@ void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr); | |||
126 | int __must_check sysfs_create_group(struct kobject *, | 126 | int __must_check sysfs_create_group(struct kobject *, |
127 | const struct attribute_group *); | 127 | const struct attribute_group *); |
128 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); | 128 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); |
129 | int sysfs_add_file_to_group(struct kobject *kobj, | ||
130 | const struct attribute *attr, const char *group); | ||
131 | void sysfs_remove_file_from_group(struct kobject *kobj, | ||
132 | const struct attribute *attr, const char *group); | ||
133 | |||
129 | void sysfs_notify(struct kobject * k, char *dir, char *attr); | 134 | void sysfs_notify(struct kobject * k, char *dir, char *attr); |
130 | 135 | ||
131 | 136 | ||
@@ -210,6 +215,18 @@ static inline void sysfs_remove_group(struct kobject * k, const struct attribute | |||
210 | ; | 215 | ; |
211 | } | 216 | } |
212 | 217 | ||
218 | static inline int sysfs_add_file_to_group(struct kobject *kobj, | ||
219 | const struct attribute *attr, const char *group) | ||
220 | { | ||
221 | return 0; | ||
222 | } | ||
223 | |||
224 | static inline void sysfs_remove_file_from_group(struct kobject *kobj, | ||
225 | const struct attribute *attr, const char *group); | ||
226 | { | ||
227 | ; | ||
228 | } | ||
229 | |||
213 | static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) | 230 | static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) |
214 | { | 231 | { |
215 | } | 232 | } |