Commit 0700f56b authored by kay.sievers@vrfy.org's avatar kay.sievers@vrfy.org Committed by Greg KH

[PATCH] kobject/hotplug split - class 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: default avatarKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 18c3d527
...@@ -430,6 +430,7 @@ int class_device_add(struct class_device *class_dev) ...@@ -430,6 +430,7 @@ int class_device_add(struct class_device *class_dev)
sysfs_create_link(&class_dev->kobj, sysfs_create_link(&class_dev->kobj,
&class_dev->dev->kobj, "device"); &class_dev->dev->kobj, "device");
kobject_hotplug(&class_dev->kobj, KOBJ_ADD);
register_done: register_done:
if (error && parent) if (error && parent)
class_put(parent); class_put(parent);
...@@ -461,6 +462,7 @@ void class_device_del(struct class_device *class_dev) ...@@ -461,6 +462,7 @@ void class_device_del(struct class_device *class_dev)
sysfs_remove_link(&class_dev->kobj, "device"); sysfs_remove_link(&class_dev->kobj, "device");
class_device_remove_attrs(class_dev); class_device_remove_attrs(class_dev);
kobject_hotplug(&class_dev->kobj, KOBJ_REMOVE);
kobject_del(&class_dev->kobj); kobject_del(&class_dev->kobj);
if (parent) if (parent)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment