Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83b5fb4c authored by Cornelia Huck's avatar Cornelia Huck Committed by Greg Kroah-Hartman
Browse files

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: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ca2f37db
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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,7 +677,6 @@ 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);
	bus_attach_device(dev);
	if (parent)