[PATCH] Driver core: send hotplug event before adding class interfaces
From: Greg KH
Date: Fri Oct 28 2005 - 01:34:20 EST
[PATCH] Driver core: send hotplug event before adding class interfaces
Move call to kobject_hotplug() above code that adds interfaces
to a class device, otherwise children's hotplug events may reach
userspace first.
Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
commit 85a44726f49989a2647cd850d55ec5be75727c5b
tree f9d837c5fb3f70626ea55bbb522c485be79b2039
parent 454a289c5bc26384c2bdc40c0d232cf47bcf0a5d
author Dmitry Torokhov <dtor_core@xxxxxxxxxxxxx> Thu, 15 Sep 2005 02:01:37 -0500
committer Greg Kroah-Hartman <gregkh@xxxxxxx> Thu, 27 Oct 2005 22:48:00 -0700
drivers/base/class.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/base/class.c b/drivers/base/class.c
index ce23dc8..8df58c5 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -524,6 +524,8 @@ int class_device_add(struct class_device
class_name);
}
+ kobject_hotplug(&class_dev->kobj, KOBJ_ADD);
+
/* notify any interfaces this device is now here */
if (parent) {
down(&parent->sem);
@@ -533,7 +535,6 @@ int class_device_add(struct class_device
class_intf->add(class_dev);
up(&parent->sem);
}
- kobject_hotplug(&class_dev->kobj, KOBJ_ADD);
register_done:
if (error && 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/