lkml.org 
[lkml]   [2005]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Greg KH <gregkh@suse.de>,
Kay Sievers <kay.sievers@vrfy.org>,
Vojtech Pavlik <vojtech@suse.cz>,
Hannes Reinecke <hare@suse.de>
Subject: [patch 06/28] Driver core: send hotplug event before adding class interfaces
Content-Disposition: inline; filename=class-call-hotplug-earier.patch
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

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@mail.ru>
---

drivers/base/class.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

Index: work/drivers/base/class.c
===================================================================
--- work.orig/drivers/base/class.c
+++ work/drivers/base/class.c
@@ -540,6 +540,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);
@@ -549,7 +551,6 @@ int class_device_add(struct class_device
class_intf->add(class_dev, class_intf);
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-15 08:58    [W:0.115 / U:1.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site