Skip to content
Snippets Groups Projects
Commit 27907689 authored by Cornelia Huck's avatar Cornelia Huck Committed by Greg Kroah-Hartman
Browse files

driver core: revert "device" link creation check


driver core: revert "device" link creation check

Commit 2ee97caf introduced an extra
check on when to create the "device" symlink. Unfortunately, this
breaks input, so let's revert to the old behaviour.

Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: default avatarKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a2765e81
No related merge requests found
...@@ -678,8 +678,7 @@ static int device_add_class_symlinks(struct device *dev) ...@@ -678,8 +678,7 @@ static int device_add_class_symlinks(struct device *dev)
if (error) if (error)
goto out_subsys; goto out_subsys;
} }
/* only bus-device parents get a "device"-link */ if (dev->parent) {
if (dev->parent && dev->parent->bus) {
error = sysfs_create_link(&dev->kobj, &dev->parent->kobj, error = sysfs_create_link(&dev->kobj, &dev->parent->kobj,
"device"); "device");
if (error) if (error)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment