]> Pileus Git - ~andy/linux/commitdiff
HID: input: fix input sysfs path for hid devices
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Thu, 19 Dec 2013 16:05:13 +0000 (11:05 -0500)
committerJiri Kosina <jkosina@suse.cz>
Fri, 20 Dec 2013 22:24:40 +0000 (23:24 +0100)
we used to set the parent of the input device as the parent of
the hid bus. This was introduced when we created hid as a real bus, and
to keep backward compatibility. Now, it's time to proper set the parent
so that sysfs has an idea of which input device is attached to
which hid device.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-input.c

index d97f2323af573ecf229f9d76b536634c57c26e17..d50e7313b171e4e9bd732cbee40a1a5cd5e501b5 100644 (file)
@@ -1279,7 +1279,7 @@ static struct hid_input *hidinput_allocate(struct hid_device *hid)
        input_dev->id.vendor  = hid->vendor;
        input_dev->id.product = hid->product;
        input_dev->id.version = hid->version;
-       input_dev->dev.parent = hid->dev.parent;
+       input_dev->dev.parent = &hid->dev;
        hidinput->input = input_dev;
        list_add_tail(&hidinput->list, &hid->inputs);