aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sysfs.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-04-14 10:44:42 -0400
committerIngo Molnar <mingo@kernel.org>2014-04-14 10:44:42 -0400
commit740c699a8d316c8bf8593f19e2ca47795e690622 (patch)
treea78886955770a477945c5d84e06b2e7678733b54 /include/linux/sysfs.h
parente69af4657e7764d03ad555f0b583d9c4217bcefa (diff)
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
Merge tag 'v3.15-rc1' into perf/urgent
Pick up the latest fixes. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r--include/linux/sysfs.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 30b2ebee6439..084354b0e814 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -71,7 +71,8 @@ struct attribute_group {
71 */ 71 */
72 72
73#define __ATTR(_name, _mode, _show, _store) { \ 73#define __ATTR(_name, _mode, _show, _store) { \
74 .attr = {.name = __stringify(_name), .mode = _mode }, \ 74 .attr = {.name = __stringify(_name), \
75 .mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
75 .show = _show, \ 76 .show = _show, \
76 .store = _store, \ 77 .store = _store, \
77} 78}
@@ -198,6 +199,7 @@ int __must_check sysfs_chmod_file(struct kobject *kobj,
198 const struct attribute *attr, umode_t mode); 199 const struct attribute *attr, umode_t mode);
199void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr, 200void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr,
200 const void *ns); 201 const void *ns);
202bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr);
201void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr); 203void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr);
202 204
203int __must_check sysfs_create_bin_file(struct kobject *kobj, 205int __must_check sysfs_create_bin_file(struct kobject *kobj,
@@ -246,6 +248,11 @@ void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr);
246 248
247int __must_check sysfs_init(void); 249int __must_check sysfs_init(void);
248 250
251static inline void sysfs_enable_ns(struct kernfs_node *kn)
252{
253 return kernfs_enable_ns(kn);
254}
255
249#else /* CONFIG_SYSFS */ 256#else /* CONFIG_SYSFS */
250 257
251static inline int sysfs_schedule_callback(struct kobject *kobj, 258static inline int sysfs_schedule_callback(struct kobject *kobj,
@@ -301,6 +308,12 @@ static inline void sysfs_remove_file_ns(struct kobject *kobj,
301{ 308{
302} 309}
303 310
311static inline bool sysfs_remove_file_self(struct kobject *kobj,
312 const struct attribute *attr)
313{
314 return false;
315}
316
304static inline void sysfs_remove_files(struct kobject *kobj, 317static inline void sysfs_remove_files(struct kobject *kobj,
305 const struct attribute **attr) 318 const struct attribute **attr)
306{ 319{
@@ -418,6 +431,10 @@ static inline int __must_check sysfs_init(void)
418 return 0; 431 return 0;
419} 432}
420 433
434static inline void sysfs_enable_ns(struct kernfs_node *kn)
435{
436}
437
421#endif /* CONFIG_SYSFS */ 438#endif /* CONFIG_SYSFS */
422 439
423static inline int __must_check sysfs_create_file(struct kobject *kobj, 440static inline int __must_check sysfs_create_file(struct kobject *kobj,