aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
430 sysfs_create_link(&class_dev->kobj, 430 sysfs_create_link(&class_dev->kobj,
431 &class_dev->dev->kobj, "device"); 431 &class_dev->dev->kobj, "device");
432 432
433 kobject_hotplug(&class_dev->kobj, KOBJ_ADD);
433 register_done: 434 register_done:
434 if (error && parent) 435 if (error && parent)
435 class_put(parent); 436 class_put(parent);
@@ -461,6 +462,7 @@ void class_device_del(struct class_device *class_dev)
461 sysfs_remove_link(&class_dev->kobj, "device"); 462 sysfs_remove_link(&class_dev->kobj, "device");
462 class_device_remove_attrs(class_dev); 463 class_device_remove_attrs(class_dev);
463 464
465 kobject_hotplug(&class_dev->kobj, KOBJ_REMOVE);
464 kobject_del(&class_dev->kobj); 466 kobject_del(&class_dev->kobj);
465 467
466 if (parent) 468 if (parent)