]> err.no Git - linux-2.6/commitdiff
[PATCH] kobject/hotplug split - devices core
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Tue, 19 Apr 2005 04:57:36 +0000 (21:57 -0700)
committerGreg KH <greg@press.kroah.org>
Tue, 19 Apr 2005 04:57:36 +0000 (21:57 -0700)
kobject_add() and kobject_del() don't emit hotplug events anymore. Do it
ourselves if we are finished populating the device directory.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/core.c

index 4e6cce8e6d3512a9344d7142fa05879861bf724e..a7cedd8cefe5385a8d2eb6f334c8661454c443d7 100644 (file)
@@ -260,6 +260,8 @@ int device_add(struct device *dev)
        /* notify platform of device entry */
        if (platform_notify)
                platform_notify(dev);
+
+       kobject_hotplug(&dev->kobj, KOBJ_ADD);
  Done:
        put_device(dev);
        return error;
@@ -349,6 +351,7 @@ void device_del(struct device * dev)
                platform_notify_remove(dev);
        bus_remove_device(dev);
        device_pm_remove(dev);
+       kobject_hotplug(&dev->kobj, KOBJ_REMOVE);
        kobject_del(&dev->kobj);
        if (parent)
                put_device(parent);