From dmonakhov@sw.ru Fri Mar 16 15:06:48 2007 From: Dmitriy Monakhov Date: Sat, 10 Mar 2007 14:00:10 +0300 Subject: kobject: kobject_shadow_add cleanup To: linux-kernel@vger.kernel.org Cc: gregkh@suse.de Message-ID: <87r6rx9xdx.fsf@sw.ru> - correct function name in comments - parrent assignment does metter only inside "if" block, so move it inside this block. Signed-off-by: Monakhov Dmitriy Signed-off-by: Greg Kroah-Hartman --- lib/kobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/lib/kobject.c +++ b/lib/kobject.c @@ -157,7 +157,7 @@ static void unlink(struct kobject * kobj } /** - * kobject_add - add an object to the hierarchy. + * kobject_shadow_add - add an object to the hierarchy. * @kobj: object. * @shadow_parent: sysfs directory to add to. */ @@ -190,8 +190,8 @@ int kobject_shadow_add(struct kobject * list_add_tail(&kobj->entry,&kobj->kset->list); spin_unlock(&kobj->kset->list_lock); + kobj->parent = parent; } - kobj->parent = parent; error = create_dir(kobj, shadow_parent); if (error) {