diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2005-04-19 00:57:34 -0400 |
---|---|---|
committer | Greg KH <greg@press.kroah.org> | 2005-04-19 00:57:34 -0400 |
commit | 18c3d5271b472c096adfc856e107c79f6fd30d7d (patch) | |
tree | 1650bafc1dea2402bbb9902ed2d236ab4d4cb50c | |
parent | 7b558637b0efc6ab3f3ca08f0b9cc0191665e9db (diff) |
[PATCH] kobject/hotplug split - kobject add/remove
kobject_add() and kobject_del() don't emit hotplug events anymore.
The user should do it itself if it has finished populating the device
directory.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-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 ff9491986b38..5df8441c44e7 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -184,8 +184,6 @@ int kobject_add(struct kobject * kobj) | |||
184 | unlink(kobj); | 184 | unlink(kobj); |
185 | if (parent) | 185 | if (parent) |
186 | kobject_put(parent); | 186 | kobject_put(parent); |
187 | } else { | ||
188 | kobject_hotplug(kobj, KOBJ_ADD); | ||
189 | } | 187 | } |
190 | 188 | ||
191 | return error; | 189 | return error; |
@@ -207,7 +205,8 @@ int kobject_register(struct kobject * kobj) | |||
207 | printk("kobject_register failed for %s (%d)\n", | 205 | printk("kobject_register failed for %s (%d)\n", |
208 | kobject_name(kobj),error); | 206 | kobject_name(kobj),error); |
209 | dump_stack(); | 207 | dump_stack(); |
210 | } | 208 | } else |
209 | kobject_hotplug(kobj, KOBJ_ADD); | ||
211 | } else | 210 | } else |
212 | error = -EINVAL; | 211 | error = -EINVAL; |
213 | return error; | 212 | return error; |
@@ -301,7 +300,6 @@ int kobject_rename(struct kobject * kobj, char *new_name) | |||
301 | 300 | ||
302 | void kobject_del(struct kobject * kobj) | 301 | void kobject_del(struct kobject * kobj) |
303 | { | 302 | { |
304 | kobject_hotplug(kobj, KOBJ_REMOVE); | ||
305 | sysfs_remove_dir(kobj); | 303 | sysfs_remove_dir(kobj); |
306 | unlink(kobj); | 304 | unlink(kobj); |
307 | } | 305 | } |
@@ -314,6 +312,7 @@ void kobject_del(struct kobject * kobj) | |||
314 | void kobject_unregister(struct kobject * kobj) | 312 | void kobject_unregister(struct kobject * kobj) |
315 | { | 313 | { |
316 | pr_debug("kobject %s: unregistering\n",kobject_name(kobj)); | 314 | pr_debug("kobject %s: unregistering\n",kobject_name(kobj)); |
315 | kobject_hotplug(kobj, KOBJ_REMOVE); | ||
317 | kobject_del(kobj); | 316 | kobject_del(kobj); |
318 | kobject_put(kobj); | 317 | kobject_put(kobj); |
319 | } | 318 | } |