diff options
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r-- | include/linux/sysfs.h | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 37fa24152bd8..9d68fed50f11 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -21,8 +21,9 @@ struct kobject; | |||
21 | struct module; | 21 | struct module; |
22 | 22 | ||
23 | /* FIXME | 23 | /* FIXME |
24 | * The *owner field is no longer used, but leave around | 24 | * The *owner field is no longer used. |
25 | * until the tree gets cleaned up fully. | 25 | * x86 tree has been cleaned up. The owner |
26 | * attribute is still left for other arches. | ||
26 | */ | 27 | */ |
27 | struct attribute { | 28 | struct attribute { |
28 | const char *name; | 29 | const char *name; |
@@ -78,6 +79,8 @@ struct sysfs_ops { | |||
78 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); | 79 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); |
79 | }; | 80 | }; |
80 | 81 | ||
82 | struct sysfs_dirent; | ||
83 | |||
81 | #ifdef CONFIG_SYSFS | 84 | #ifdef CONFIG_SYSFS |
82 | 85 | ||
83 | int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *), | 86 | int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *), |
@@ -117,9 +120,14 @@ int sysfs_add_file_to_group(struct kobject *kobj, | |||
117 | void sysfs_remove_file_from_group(struct kobject *kobj, | 120 | void sysfs_remove_file_from_group(struct kobject *kobj, |
118 | const struct attribute *attr, const char *group); | 121 | const struct attribute *attr, const char *group); |
119 | 122 | ||
120 | void sysfs_notify(struct kobject *kobj, char *dir, char *attr); | 123 | void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr); |
121 | 124 | void sysfs_notify_dirent(struct sysfs_dirent *sd); | |
122 | extern int __must_check sysfs_init(void); | 125 | struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd, |
126 | const unsigned char *name); | ||
127 | struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd); | ||
128 | void sysfs_put(struct sysfs_dirent *sd); | ||
129 | void sysfs_printk_last_file(void); | ||
130 | int __must_check sysfs_init(void); | ||
123 | 131 | ||
124 | #else /* CONFIG_SYSFS */ | 132 | #else /* CONFIG_SYSFS */ |
125 | 133 | ||
@@ -222,7 +230,24 @@ static inline void sysfs_remove_file_from_group(struct kobject *kobj, | |||
222 | { | 230 | { |
223 | } | 231 | } |
224 | 232 | ||
225 | static inline void sysfs_notify(struct kobject *kobj, char *dir, char *attr) | 233 | static inline void sysfs_notify(struct kobject *kobj, const char *dir, |
234 | const char *attr) | ||
235 | { | ||
236 | } | ||
237 | static inline void sysfs_notify_dirent(struct sysfs_dirent *sd) | ||
238 | { | ||
239 | } | ||
240 | static inline | ||
241 | struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd, | ||
242 | const unsigned char *name) | ||
243 | { | ||
244 | return NULL; | ||
245 | } | ||
246 | static inline struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd) | ||
247 | { | ||
248 | return NULL; | ||
249 | } | ||
250 | static inline void sysfs_put(struct sysfs_dirent *sd) | ||
226 | { | 251 | { |
227 | } | 252 | } |
228 | 253 | ||
@@ -231,6 +256,10 @@ static inline int __must_check sysfs_init(void) | |||
231 | return 0; | 256 | return 0; |
232 | } | 257 | } |
233 | 258 | ||
259 | static inline void sysfs_printk_last_file(void) | ||
260 | { | ||
261 | } | ||
262 | |||
234 | #endif /* CONFIG_SYSFS */ | 263 | #endif /* CONFIG_SYSFS */ |
235 | 264 | ||
236 | #endif /* _SYSFS_H_ */ | 265 | #endif /* _SYSFS_H_ */ |