Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=83b5fb4cce13b9f7b218ed88ee05387c3f3bdda3 Commit: 83b5fb4cce13b9f7b218ed88ee05387c3f3bdda3 Parent: ca2f37dbc5324c7278577731033a358f1f86050a Author: Cornelia Huck <[EMAIL PROTECTED]> AuthorDate: Thu Mar 29 11:12:11 2007 +0200 Committer: Greg Kroah-Hartman <[EMAIL PROTECTED]> CommitDate: Fri Apr 27 10:57:29 2007 -0700
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 <[EMAIL PROTECTED]> Cc: Kay Sievers <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- 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); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html