aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index be6aeb43079..c34a4d8842e 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);