diff options
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r-- | include/linux/sysfs.h | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 37fa24152bd8..b330e289d71f 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -78,6 +78,8 @@ struct sysfs_ops { | |||
78 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); | 78 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); |
79 | }; | 79 | }; |
80 | 80 | ||
81 | struct sysfs_dirent; | ||
82 | |||
81 | #ifdef CONFIG_SYSFS | 83 | #ifdef CONFIG_SYSFS |
82 | 84 | ||
83 | int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *), | 85 | int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *), |
@@ -117,9 +119,14 @@ int sysfs_add_file_to_group(struct kobject *kobj, | |||
117 | void sysfs_remove_file_from_group(struct kobject *kobj, | 119 | void sysfs_remove_file_from_group(struct kobject *kobj, |
118 | const struct attribute *attr, const char *group); | 120 | const struct attribute *attr, const char *group); |
119 | 121 | ||
120 | void sysfs_notify(struct kobject *kobj, char *dir, char *attr); | 122 | void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr); |
121 | 123 | void sysfs_notify_dirent(struct sysfs_dirent *sd); | |
122 | extern int __must_check sysfs_init(void); | 124 | struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd, |
125 | const unsigned char *name); | ||
126 | struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd); | ||
127 | void sysfs_put(struct sysfs_dirent *sd); | ||
128 | void sysfs_printk_last_file(void); | ||
129 | int __must_check sysfs_init(void); | ||
123 | 130 | ||
124 | #else /* CONFIG_SYSFS */ | 131 | #else /* CONFIG_SYSFS */ |
125 | 132 | ||
@@ -222,7 +229,24 @@ static inline void sysfs_remove_file_from_group(struct kobject *kobj, | |||
222 | { | 229 | { |
223 | } | 230 | } |
224 | 231 | ||
225 | static inline void sysfs_notify(struct kobject *kobj, char *dir, char *attr) | 232 | static inline void sysfs_notify(struct kobject *kobj, const char *dir, |
233 | const char *attr) | ||
234 | { | ||
235 | } | ||
236 | static inline void sysfs_notify_dirent(struct sysfs_dirent *sd) | ||
237 | { | ||
238 | } | ||
239 | static inline | ||
240 | struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd, | ||
241 | const unsigned char *name) | ||
242 | { | ||
243 | return NULL; | ||
244 | } | ||
245 | static inline struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd) | ||
246 | { | ||
247 | return NULL; | ||
248 | } | ||
249 | static inline void sysfs_put(struct sysfs_dirent *sd) | ||
226 | { | 250 | { |
227 | } | 251 | } |
228 | 252 | ||
@@ -231,6 +255,10 @@ static inline int __must_check sysfs_init(void) | |||
231 | return 0; | 255 | return 0; |
232 | } | 256 | } |
233 | 257 | ||
258 | static inline void sysfs_printk_last_file(void) | ||
259 | { | ||
260 | } | ||
261 | |||
234 | #endif /* CONFIG_SYSFS */ | 262 | #endif /* CONFIG_SYSFS */ |
235 | 263 | ||
236 | #endif /* _SYSFS_H_ */ | 264 | #endif /* _SYSFS_H_ */ |