]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
HID: asus: use same report_id in response
authorAntheas Kapenekakis <lkml@antheas.dev>
Thu, 22 Jan 2026 07:50:36 +0000 (08:50 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 28 Jan 2026 12:02:23 +0000 (14:02 +0200)
Currently, asus_kbd_get_functions prods the device using feature
report report_id, but then is hardcoded to check the response through
FEATURE_KBD_REPORT_ID. This only works if report_id is that value
(currently true). So, use report_id in the response as well to
maintain functionality if that value changes in the future.

Reviewed-by: Denis Benato <benato.denis96@gmail.com>
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://patch.msgid.link/20260122075044.5070-4-lkml@antheas.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/hid/hid-asus.c

index 92904b5a700cf079da0834b2752c52084b169a1a..2ff2170dc30a25a5cf624c32cef5ab1b975943eb 100644 (file)
@@ -424,7 +424,7 @@ static int asus_kbd_get_functions(struct hid_device *hdev,
        if (!readbuf)
                return -ENOMEM;
 
-       ret = hid_hw_raw_request(hdev, FEATURE_KBD_REPORT_ID, readbuf,
+       ret = hid_hw_raw_request(hdev, report_id, readbuf,
                                 FEATURE_KBD_REPORT_SIZE, HID_FEATURE_REPORT,
                                 HID_REQ_GET_REPORT);
        if (ret < 0) {