diff options
author | Dmitriy Monakhov <dmonakhov@openvz.org> | 2007-03-10 06:00:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 13:57:28 -0400 |
commit | 460f7e9a1bde2c74f060f7ce0a308dab4be6a56b (patch) | |
tree | 06046ece68667211512733bb8a16201a076f47ac /lib | |
parent | 414264f959cf46f49f974b3510400e12ac3624a6 (diff) |
kobject: kobject_shadow_add cleanup
- correct function name in comments
- parrent assignment does metter only inside "if" block,
so move it inside this block.
Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index f66455155606..bbbfab4145e6 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -157,7 +157,7 @@ static void unlink(struct kobject * kobj) | |||
157 | } | 157 | } |
158 | 158 | ||
159 | /** | 159 | /** |
160 | * kobject_add - add an object to the hierarchy. | 160 | * kobject_shadow_add - add an object to the hierarchy. |
161 | * @kobj: object. | 161 | * @kobj: object. |
162 | * @shadow_parent: sysfs directory to add to. | 162 | * @shadow_parent: sysfs directory to add to. |
163 | */ | 163 | */ |
@@ -190,8 +190,8 @@ int kobject_shadow_add(struct kobject * kobj, struct dentry *shadow_parent) | |||
190 | 190 | ||
191 | list_add_tail(&kobj->entry,&kobj->kset->list); | 191 | list_add_tail(&kobj->entry,&kobj->kset->list); |
192 | spin_unlock(&kobj->kset->list_lock); | 192 | spin_unlock(&kobj->kset->list_lock); |
193 | kobj->parent = parent; | ||
193 | } | 194 | } |
194 | kobj->parent = parent; | ||
195 | 195 | ||
196 | error = create_dir(kobj, shadow_parent); | 196 | error = create_dir(kobj, shadow_parent); |
197 | if (error) { | 197 | if (error) { |