summaryrefslogtreecommitdiffstats
path: root/drivers/base/class.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-04-19 06:57:35 +0200
committerGreg KH <greg@press.kroah.org>2005-04-19 06:57:35 +0200
commit0700f56bbca56bc930aab717bc5086336991441f (patch)
tree39bf581991850bf0b8bd1643d3adb8a049591250 /drivers/base/class.c
parent[PATCH] kobject/hotplug split - kobject add/remove (diff)
downloadlinux-0700f56bbca56bc930aab717bc5086336991441f.tar.xz
linux-0700f56bbca56bc930aab717bc5086336991441f.zip
[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: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/class.c')
-rw-r--r--drivers/base/class.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 6bf650fce78c..d2a2f8f2b4ed 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -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);
@@ -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)