提交 e57cd73e 编写于 作者: K kay.sievers@vrfy.org 提交者: Greg KH

[PATCH] kobject/hotplug split - devices core

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: NKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 b41148c0
...@@ -260,6 +260,8 @@ int device_add(struct device *dev) ...@@ -260,6 +260,8 @@ int device_add(struct device *dev)
/* notify platform of device entry */ /* notify platform of device entry */
if (platform_notify) if (platform_notify)
platform_notify(dev); platform_notify(dev);
kobject_hotplug(&dev->kobj, KOBJ_ADD);
Done: Done:
put_device(dev); put_device(dev);
return error; return error;
...@@ -349,6 +351,7 @@ void device_del(struct device * dev) ...@@ -349,6 +351,7 @@ void device_del(struct device * dev)
platform_notify_remove(dev); platform_notify_remove(dev);
bus_remove_device(dev); bus_remove_device(dev);
device_pm_remove(dev); device_pm_remove(dev);
kobject_hotplug(&dev->kobj, KOBJ_REMOVE);
kobject_del(&dev->kobj); kobject_del(&dev->kobj);
if (parent) if (parent)
put_device(parent); put_device(parent);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册