aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-04-04 14:42:26 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 15:40:47 -0400
commit53877d06d53a412d901bb323f080296c363d8b51 (patch)
treeceffbd4dd9342e1742bf59165880888f7f961f33 /drivers/base/core.c
parent27c0ff868f2ad3c9732ce45abbb8dd7e1723931f (diff)
[PATCH] Driver core: bus device event delay
split bus_add_device() and send device uevents after sysfs population Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 6b355bd7816d..d5e15a03584e 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -274,11 +274,12 @@ int device_add(struct device *dev)
274 dev->uevent_attr.store = store_uevent; 274 dev->uevent_attr.store = store_uevent;
275 device_create_file(dev, &dev->uevent_attr); 275 device_create_file(dev, &dev->uevent_attr);
276 276
277 kobject_uevent(&dev->kobj, KOBJ_ADD);
278 if ((error = device_pm_add(dev))) 277 if ((error = device_pm_add(dev)))
279 goto PMError; 278 goto PMError;
280 if ((error = bus_add_device(dev))) 279 if ((error = bus_add_device(dev)))
281 goto BusError; 280 goto BusError;
281 kobject_uevent(&dev->kobj, KOBJ_ADD);
282 bus_attach_device(dev);
282 if (parent) 283 if (parent)
283 klist_add_tail(&dev->knode_parent, &parent->klist_children); 284 klist_add_tail(&dev->knode_parent, &parent->klist_children);
284 285