[PATCH 2/6] kobject/hotplug split - class core

From: Kay Sievers
Date: Thu Mar 17 2005 - 23:06:19 EST


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@xxxxxxxx>

===== drivers/base/class.c 1.61 vs edited =====
--- 1.61/drivers/base/class.c 2005-03-15 17:52:00 +01:00
+++ edited/drivers/base/class.c 2005-03-18 02:17:17 +01:00
@@ -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)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/