Skip to contentSkip to conversation

kobject/hotplug split - class core

PATCH In review Kay Sievers 1 participant 1 message Mar 18, 2005 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 2/6 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.

===== drivers/base/class.c 1.61 vs edited =====

drivers/base/class.c +2 -0
@@ -491,6 +491,7 @@ int class_device_add(struct class_device
 		up(&parent->sem);
 	}
 
+	kobject_hotplug(&class_dev->kobj, KOBJ_ADD);
  register_done:
 	if (error && parent)
 		class_put(parent);
@@ -562,6 +563,7 @@ void class_device_del(struct class_devic
 	}
 	class_device_remove_attrs(class_dev);
 
+	kobject_hotplug(&class_dev->kobj, KOBJ_REMOVE);
 	kobject_del(&class_dev->kobj);
 
 	if (parent)