aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sysfs.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2010-02-12 22:22:25 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-07 20:04:52 -0500
commit7cb32942d91a501b2df944928ccc9e6590ab237b (patch)
tree7c6ff2a82705d7dda8a566702f3bab981d03bf54 /include/linux/sysfs.h
parent19c38b632d4554329986021fd66bdea468cf452c (diff)
sysfs: Implement sysfs_rename_link
Because of rename ordering problems we occassionally give false warnings about invalid sysfs operations. So using sysfs_rename create a sysfs_rename_link function that doesn't need strange workarounds. Cc: Benjamin Thery <benjamin.thery@bull.net> Cc: Daniel Lezcano <dlezcano@fr.ibm.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r--include/linux/sysfs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 5b8f80f5aca6..d77cde6d0498 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -151,6 +151,9 @@ int __must_check sysfs_create_link_nowarn(struct kobject *kobj,
151 const char *name); 151 const char *name);
152void sysfs_remove_link(struct kobject *kobj, const char *name); 152void sysfs_remove_link(struct kobject *kobj, const char *name);
153 153
154int sysfs_rename_link(struct kobject *kobj, struct kobject *target,
155 const char *old_name, const char *new_name);
156
154int __must_check sysfs_create_group(struct kobject *kobj, 157int __must_check sysfs_create_group(struct kobject *kobj,
155 const struct attribute_group *grp); 158 const struct attribute_group *grp);
156int sysfs_update_group(struct kobject *kobj, 159int sysfs_update_group(struct kobject *kobj,
@@ -255,6 +258,12 @@ static inline void sysfs_remove_link(struct kobject *kobj, const char *name)
255{ 258{
256} 259}
257 260
261static inline int sysfs_rename_link(struct kobject *k, struct kobject *t,
262 const char *old_name, const char *new_name)
263{
264 return 0;
265}
266
258static inline int sysfs_create_group(struct kobject *kobj, 267static inline int sysfs_create_group(struct kobject *kobj,
259 const struct attribute_group *grp) 268 const struct attribute_group *grp)
260{ 269{