aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sysfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r--include/linux/sysfs.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index eee485957c0c..192de3afa96b 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -16,6 +16,7 @@
16 16
17struct kobject; 17struct kobject;
18struct module; 18struct module;
19struct nameidata;
19 20
20struct attribute { 21struct attribute {
21 const char * name; 22 const char * name;
@@ -89,13 +90,13 @@ struct sysfs_dirent {
89#ifdef CONFIG_SYSFS 90#ifdef CONFIG_SYSFS
90 91
91extern int __must_check 92extern int __must_check
92sysfs_create_dir(struct kobject *); 93sysfs_create_dir(struct kobject *, struct dentry *);
93 94
94extern void 95extern void
95sysfs_remove_dir(struct kobject *); 96sysfs_remove_dir(struct kobject *);
96 97
97extern int __must_check 98extern int __must_check
98sysfs_rename_dir(struct kobject *, const char *new_name); 99sysfs_rename_dir(struct kobject *, struct dentry *, const char *new_name);
99 100
100extern int __must_check 101extern int __must_check
101sysfs_move_dir(struct kobject *, struct kobject *); 102sysfs_move_dir(struct kobject *, struct kobject *);
@@ -127,11 +128,17 @@ int __must_check sysfs_create_group(struct kobject *,
127void sysfs_remove_group(struct kobject *, const struct attribute_group *); 128void sysfs_remove_group(struct kobject *, const struct attribute_group *);
128void sysfs_notify(struct kobject * k, char *dir, char *attr); 129void sysfs_notify(struct kobject * k, char *dir, char *attr);
129 130
131
132extern int sysfs_make_shadowed_dir(struct kobject *kobj,
133 void * (*follow_link)(struct dentry *, struct nameidata *));
134extern struct dentry *sysfs_create_shadow_dir(struct kobject *kobj);
135extern void sysfs_remove_shadow_dir(struct dentry *dir);
136
130extern int __must_check sysfs_init(void); 137extern int __must_check sysfs_init(void);
131 138
132#else /* CONFIG_SYSFS */ 139#else /* CONFIG_SYSFS */
133 140
134static inline int sysfs_create_dir(struct kobject * k) 141static inline int sysfs_create_dir(struct kobject * k, struct dentry *shadow)
135{ 142{
136 return 0; 143 return 0;
137} 144}
@@ -141,7 +148,9 @@ static inline void sysfs_remove_dir(struct kobject * k)
141 ; 148 ;
142} 149}
143 150
144static inline int sysfs_rename_dir(struct kobject * k, const char *new_name) 151static inline int sysfs_rename_dir(struct kobject * k,
152 struct dentry *new_parent,
153 const char *new_name)
145{ 154{
146 return 0; 155 return 0;
147} 156}
@@ -205,6 +214,12 @@ static inline void sysfs_notify(struct kobject * k, char *dir, char *attr)
205{ 214{
206} 215}
207 216
217static inline int sysfs_make_shadowed_dir(struct kobject *kobj,
218 void * (*follow_link)(struct dentry *, struct nameidata *))
219{
220 return 0;
221}
222
208static inline int __must_check sysfs_init(void) 223static inline int __must_check sysfs_init(void)
209{ 224{
210 return 0; 225 return 0;