Skip to content

Commit

Permalink
[PATCH] kobject/hotplug split - class 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 18c3d52 commit 0700f56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ int class_device_add(struct class_device *class_dev)
sysfs_create_link(&class_dev->kobj,
&class_dev->dev->kobj, "device");

kobject_hotplug(&class_dev->kobj, KOBJ_ADD);
register_done:
if (error && parent)
class_put(parent);
Expand Down Expand Up @@ -461,6 +462,7 @@ void class_device_del(struct class_device *class_dev)
sysfs_remove_link(&class_dev->kobj, "device");
class_device_remove_attrs(class_dev);

kobject_hotplug(&class_dev->kobj, KOBJ_REMOVE);
kobject_del(&class_dev->kobj);

if (parent)
Expand Down

0 comments on commit 0700f56

Please sign in to comment.