Commit 3f5468c9 authored by Kay Sievers's avatar Kay Sievers Committed by Greg Kroah-Hartman

Driver-Core: require valid action string in uevent trigger

No longer fall back to "add" and warn, but always require a valid
action-string written to the "uevent" file.
Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7934779a
...@@ -306,15 +306,10 @@ static ssize_t store_uevent(struct device *dev, struct device_attribute *attr, ...@@ -306,15 +306,10 @@ static ssize_t store_uevent(struct device *dev, struct device_attribute *attr,
{ {
enum kobject_action action; enum kobject_action action;
if (kobject_action_type(buf, count, &action) == 0) { if (kobject_action_type(buf, count, &action) == 0)
kobject_uevent(&dev->kobj, action); kobject_uevent(&dev->kobj, action);
goto out; else
} dev_err(dev, "uevent: unknown action-string\n");
dev_err(dev, "uevent: unsupported action-string; this will "
"be ignored in a future kernel version\n");
kobject_uevent(&dev->kobj, KOBJ_ADD);
out:
return count; return count;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment