diff options
-rw-r--r-- | drivers/base/core.c | 3 | ||||
-rw-r--r-- | include/linux/device.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 34ac18778d8a..e13614241c9e 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -589,7 +589,8 @@ int device_add(struct device *dev) | |||
589 | goto PMError; | 589 | goto PMError; |
590 | if ((error = bus_add_device(dev))) | 590 | if ((error = bus_add_device(dev))) |
591 | goto BusError; | 591 | goto BusError; |
592 | kobject_uevent(&dev->kobj, KOBJ_ADD); | 592 | if (!dev->uevent_suppress) |
593 | kobject_uevent(&dev->kobj, KOBJ_ADD); | ||
593 | if ((error = bus_attach_device(dev))) | 594 | if ((error = bus_attach_device(dev))) |
594 | goto AttachError; | 595 | goto AttachError; |
595 | if (parent) | 596 | if (parent) |
diff --git a/include/linux/device.h b/include/linux/device.h index e1e164f81eea..5ca1cdba563a 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -399,9 +399,10 @@ struct device { | |||
399 | 399 | ||
400 | /* class_device migration path */ | 400 | /* class_device migration path */ |
401 | struct list_head node; | 401 | struct list_head node; |
402 | struct class *class; /* optional*/ | 402 | struct class *class; |
403 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 403 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
404 | struct attribute_group **groups; /* optional groups */ | 404 | struct attribute_group **groups; /* optional groups */ |
405 | int uevent_suppress; | ||
405 | 406 | ||
406 | void (*release)(struct device * dev); | 407 | void (*release)(struct device * dev); |
407 | }; | 408 | }; |