diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org.(none)> | 2005-04-19 13:14:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org.(none)> | 2005-04-19 13:14:28 -0700 |
commit | 9f6c6fc505560465be0964eb4da1b6ca97bd3951 (patch) | |
tree | 9660991b5e417ad7bb74e105c037ff358f60ba27 /lib | |
parent | c3c661932cd53582c5b03692b99649300977248a (diff) | |
parent | f0e035f4b6940aae6836500b642029c289ed4535 (diff) |
Merge with kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6.git/
for 13 driver core, sysfs, and debugfs fixes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kobject.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index ff9491986b3..5df8441c44e 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -184,8 +184,6 @@ int kobject_add(struct kobject * kobj) unlink(kobj); if (parent) kobject_put(parent); - } else { - kobject_hotplug(kobj, KOBJ_ADD); } return error; @@ -207,7 +205,8 @@ int kobject_register(struct kobject * kobj) printk("kobject_register failed for %s (%d)\n", kobject_name(kobj),error); dump_stack(); - } + } else + kobject_hotplug(kobj, KOBJ_ADD); } else error = -EINVAL; return error; @@ -301,7 +300,6 @@ int kobject_rename(struct kobject * kobj, char *new_name) void kobject_del(struct kobject * kobj) { - kobject_hotplug(kobj, KOBJ_REMOVE); sysfs_remove_dir(kobj); unlink(kobj); } @@ -314,6 +312,7 @@ void kobject_del(struct kobject * kobj) void kobject_unregister(struct kobject * kobj) { pr_debug("kobject %s: unregistering\n",kobject_name(kobj)); + kobject_hotplug(kobj, KOBJ_REMOVE); kobject_del(kobj); kobject_put(kobj); } |