Skip to content

Commit

Permalink
[PATCH] kobject/hotplug split - devices core
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kay.sievers@vrfy.org authored and Greg KH committed Apr 19, 2005
1 parent b41148c commit e57cd73
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e57cd73

Please sign in to comment.