diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2008-07-03 21:05:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-16 12:24:52 -0400 |
commit | 0b4a4fea253e1296222603ccc55430ed7cd9413a (patch) | |
tree | 5ce1810393a0f3a48ac208e0dbf994b63a481f18 /include/linux/sysfs.h | |
parent | 030c1d2bfcc2187650fb975456ca0b61a5bb77f4 (diff) |
kobject: Cleanup kobject_rename and !CONFIG_SYSFS
It finally dawned on me what the clean fix to sysfs_rename_dir
calling kobject_set_name is. Move the work into kobject_rename
where it belongs. The callers serialize us anyway so this is
safe.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r-- | include/linux/sysfs.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 39924a962207..b330e289d71f 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -20,8 +20,6 @@ | |||
20 | struct kobject; | 20 | struct kobject; |
21 | struct module; | 21 | struct module; |
22 | 22 | ||
23 | extern int kobject_set_name(struct kobject *kobj, const char *name, ...) | ||
24 | __attribute__((format(printf, 2, 3))); | ||
25 | /* FIXME | 23 | /* FIXME |
26 | * The *owner field is no longer used, but leave around | 24 | * The *owner field is no longer used, but leave around |
27 | * until the tree gets cleaned up fully. | 25 | * until the tree gets cleaned up fully. |
@@ -149,7 +147,7 @@ static inline void sysfs_remove_dir(struct kobject *kobj) | |||
149 | 147 | ||
150 | static inline int sysfs_rename_dir(struct kobject *kobj, const char *new_name) | 148 | static inline int sysfs_rename_dir(struct kobject *kobj, const char *new_name) |
151 | { | 149 | { |
152 | return kobject_set_name(kobj, "%s", new_name); | 150 | return 0; |
153 | } | 151 | } |
154 | 152 | ||
155 | static inline int sysfs_move_dir(struct kobject *kobj, | 153 | static inline int sysfs_move_dir(struct kobject *kobj, |