From e1b63c0148a7f8edf1691770ec0527fe86fb6ab8 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Tue, 24 Apr 2018 10:04:32 +0200 Subject: HID: store the full list of reports in the hidinput We were only storing the report in case of QUIRK_MULTI_INPUT. It is interesting for the upcoming HID_QUIRK_INPUT_PER_APP to also store the full list of reports that are attached to it. We need the full list because a device (Advanced Silicon has some) might want to use a different report ID for the Input reports and the Output reports. Storing the full list allows the drivers to have all the data. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina --- drivers/hid/hid-input.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/hid/hid-input.c') diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 0405677..fd1c4fe 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1526,9 +1526,12 @@ static struct hid_input *hidinput_allocate(struct hid_device *hid) input_dev->id.product = hid->product; input_dev->id.version = hid->version; input_dev->dev.parent = &hid->dev; + hidinput->input = input_dev; list_add_tail(&hidinput->list, &hid->inputs); + INIT_LIST_HEAD(&hidinput->reports); + return hidinput; } @@ -1678,6 +1681,9 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) if (hid->quirks & HID_QUIRK_MULTI_INPUT) hidinput->report = report; + + list_add_tail(&report->hidinput_list, + &hidinput->reports); } } -- cgit v1.1