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

CONFIG_SYSFS_DEPRECATED - PHYSDEV* uevent variables

Disable the PHYSDEV* uevent variables if CONFIG_SYSFS_DEPRECATED is
enabled.
Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 99ef3ef8
......@@ -154,20 +154,24 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, char **envp,
"MINOR=%u", MINOR(dev->devt));
}
#ifdef CONFIG_SYSFS_DEPRECATED
/* add bus name (same as SUBSYSTEM, deprecated) */
if (dev->bus)
add_uevent_var(envp, num_envp, &i,
buffer, buffer_size, &length,
"PHYSDEVBUS=%s", dev->bus->name);
#endif
/* add driver name (PHYSDEV* values are deprecated)*/
if (dev->driver) {
add_uevent_var(envp, num_envp, &i,
buffer, buffer_size, &length,
"DRIVER=%s", dev->driver->name);
#ifdef CONFIG_SYSFS_DEPRECATED
add_uevent_var(envp, num_envp, &i,
buffer, buffer_size, &length,
"PHYSDEVDRIVER=%s", dev->driver->name);
#endif
}
/* terminate, set to next free slot, shrink available space */
......
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