From: Kay Sievers <[email protected]> For the block subsystem, we want to delay all uevents until the disk has been scanned and allpartitons are already created before the first event is sent out. Signed-off-by: Kay Sievers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> --- drivers/base/core.c | 3 ++- 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 34ac187..e136142 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -589,7 +589,8 @@ int device_add(struct device *dev) goto PMError; if ((error = bus_add_device(dev))) goto BusError; - kobject_uevent(&dev->kobj, KOBJ_ADD); + if (!dev->uevent_suppress) + kobject_uevent(&dev->kobj, KOBJ_ADD); if ((error = bus_attach_device(dev))) goto AttachError; if (parent) diff --git a/include/linux/device.h b/include/linux/device.h index e1e164f..5ca1cdb 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -399,9 +399,10 @@ struct device { /* class_device migration path */ struct list_head node; - struct class *class; /* optional*/ + struct class *class; dev_t devt; /* dev_t, creates the sysfs "dev" */ struct attribute_group **groups; /* optional groups */ + int uevent_suppress; void (*release)(struct device * dev); }; -- 1.4.4.4 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- [GIT PATCH] Driver core patches for 2.6.20
- From: Greg KH <[email protected]>
- [PATCH 1/28] Kobject: make kobject apis more robust in handling NULL pointers
- From: Greg KH <[email protected]>
- [PATCH 2/28] Driver core: convert pcmcia code to use struct device
- From: Greg KH <[email protected]>
- [PATCH 3/28] Driver core: convert SPI code to use struct device
- From: Greg KH <[email protected]>
- [PATCH 4/28] Network: convert network devices to use struct device instead of class_device
- From: Greg KH <[email protected]>
- [PATCH 5/28] driver core: Remove device_is_registered() in device_move().
- From: Greg KH <[email protected]>
- [PATCH 6/28] driver core: Allow device_move(dev, NULL).
- From: Greg KH <[email protected]>
- [PATCH 7/28] MODULES: add the module name for built in kernel drivers
- From: Greg KH <[email protected]>
- [PATCH 8/28] Modules: only add drivers/ direcory if needed
- From: Greg KH <[email protected]>
- [PATCH 9/28] PCI: add the sysfs driver name to all modules
- From: Greg KH <[email protected]>
- [PATCH 10/28] SERIO: add the sysfs driver name to all modules
- From: Greg KH <[email protected]>
- [PATCH 11/28] USB: add the sysfs driver name to all modules
- From: Greg KH <[email protected]>
- [PATCH 12/28] /sys/modules/*/holders
- From: Greg KH <[email protected]>
- [PATCH 13/28] driver core fixes: make_class_name() retval checks
- From: Greg KH <[email protected]>
- [PATCH 14/28] driver core fixes: device_register() retval check in platform.c
- From: Greg KH <[email protected]>
- [PATCH 15/28] driver core: Don't stop probing on ->probe errors.
- From: Greg KH <[email protected]>
- [PATCH 16/28] driver core: Change function call order in device_bind_driver().
- From: Greg KH <[email protected]>
- [PATCH 17/28] Driver core: fix race in sysfs between sysfs_remove_file() and read()/write()
- From: Greg KH <[email protected]>
- [PATCH 18/28] sysfs: suppress lockdep warnings
- From: Greg KH <[email protected]>
- [PATCH 19/28] sysfs: kobject_put cleanup
- From: Greg KH <[email protected]>
- [PATCH 20/28] kobject: kobject_put cleanup
- From: Greg KH <[email protected]>
- [PATCH 22/28] HOWTO: Add a reference to Harbison and Steele
- From: Greg KH <[email protected]>
- [PATCH 23/28] SYSFS: Fix missing include of list.h in sysfs.h
- From: Greg KH <[email protected]>
- [PATCH 24/28] Driver core: add uevent vars for devices of a class
- From: Greg KH <[email protected]>
- [PATCH 25/28] Driver core: add device_type to struct device
- From: Greg KH <[email protected]>
- [GIT PATCH] Driver core patches for 2.6.20
- Prev by Date: [PATCH 25/28] Driver core: add device_type to struct device
- Next by Date: [PATCH 9/28] PCI: add the sysfs driver name to all modules
- Previous by thread: [PATCH 25/28] Driver core: add device_type to struct device
- Next by thread: [PATCH 27/28] Driver Core: Increase the default timeout value of the firmware subsystem
- Index(es):