Commit aae6c286 authored by Jiri Kosina's avatar Jiri Kosina

HID: set proper dev.parent in hidraw

We need to properly set parent of the hidraw device (which is the
corresponding physical device itself) in order to hidraw devices not
end up under virtual device tree.
Reported-by: default avatarKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 3a6f82f7
...@@ -357,7 +357,7 @@ int hidraw_connect(struct hid_device *hid) ...@@ -357,7 +357,7 @@ int hidraw_connect(struct hid_device *hid)
goto out; goto out;
} }
dev->dev = device_create(hidraw_class, NULL, MKDEV(hidraw_major, minor), dev->dev = device_create(hidraw_class, &hid->dev, MKDEV(hidraw_major, minor),
NULL, "%s%d", "hidraw", minor); NULL, "%s%d", "hidraw", minor);
if (IS_ERR(dev->dev)) { if (IS_ERR(dev->dev)) {
......
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