mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Patch -mm 1/3] Driver core: suppress uevents via filter.
@ 2007-03-29  9:12 Cornelia Huck
  2007-04-12  7:04 ` patch driver-core-suppress-uevents-via-filter.patch added to gregkh-2.6 tree gregkh
  0 siblings, 1 reply; 2+ messages in thread
From: Cornelia Huck @ 2007-03-29  9:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Greg K-H, Kay Sievers, Eric Rannaud

From: Cornelia Huck <cornelia.huck@de.ibm.com>

Suppress uevents for devices if uevent_suppress is set via
dev_uevent_filter(). This makes the driver core suppress all device
uevents, not just the add event in device_add().

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>

---
 drivers/base/core.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

--- linux-2.6.21-rc5-mm1.orig/drivers/base/core.c
+++ linux-2.6.21-rc5-mm1/drivers/base/core.c
@@ -134,6 +134,8 @@ static int dev_uevent_filter(struct kset
 
 	if (ktype == &ktype_device) {
 		struct device *dev = to_dev(kobj);
+		if (dev->uevent_suppress)
+			return 0;
 		if (dev->bus)
 			return 1;
 		if (dev->class)
@@ -689,8 +691,7 @@ int device_add(struct device *dev)
 		goto PMError;
 	if ((error = bus_add_device(dev)))
 		goto BusError;
-	if (!dev->uevent_suppress)
-		kobject_uevent(&dev->kobj, KOBJ_ADD);
+	kobject_uevent(&dev->kobj, KOBJ_ADD);
 	bus_attach_device(dev);
 	if (parent)
 		klist_add_tail(&dev->knode_parent, &parent->klist_children);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-12  7:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-29  9:12 [Patch -mm 1/3] Driver core: suppress uevents via filter Cornelia Huck
2007-04-12  7:04 ` patch driver-core-suppress-uevents-via-filter.patch added to gregkh-2.6 tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®