diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2007-03-29 11:12:11 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 10:57:29 -0700 |
commit | 83b5fb4cce13b9f7b218ed88ee05387c3f3bdda3 (patch) | |
tree | 5b949c6fd72329ff395743dc3c36cac0f48efc87 | |
parent | ca2f37dbc5324c7278577731033a358f1f86050a (diff) | |
download | op-kernel-dev-83b5fb4cce13b9f7b218ed88ee05387c3f3bdda3.zip op-kernel-dev-83b5fb4cce13b9f7b218ed88ee05387c3f3bdda3.tar.gz |
Driver core: suppress uevents via filter
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>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/base/core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index be6aeb4..c34a4d8 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -120,6 +120,8 @@ static int dev_uevent_filter(struct kset *kset, struct kobject *kobj) if (ktype == &ktype_device) { struct device *dev = to_dev(kobj); + if (dev->uevent_suppress) + return 0; if (dev->bus) return 1; if (dev->class) @@ -675,8 +677,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); |