From: Jiri Kosina Date: Thu, 4 Dec 2008 15:16:46 +0000 (+0100) Subject: HID: set proper dev.parent in hidraw X-Git-Tag: v2.6.29-rc1~498^2~8 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=aae6c286dad33c7f2c6992b9e310a371f2ae377e;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 975edd88a3d..aab5911c4e3 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c @@ -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)) {