1
0
Fork 0

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: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
hifive-unleashed-5.1
Jiri Kosina 2008-12-04 16:16:46 +01:00
parent 3a6f82f7a2
commit aae6c286da
1 changed files with 1 additions and 1 deletions

View File

@ -357,7 +357,7 @@ int hidraw_connect(struct hid_device *hid)
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);
if (IS_ERR(dev->dev)) {