Skip to content

Commit

Permalink
HID: set proper dev.parent in hidraw
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Kosina committed Jan 4, 2009
1 parent 3a6f82f commit aae6c28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hid/hidraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit aae6c28

Please sign in to comment.