[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250319191320.10092-3-lkml@antheas.dev>
Date: Wed, 19 Mar 2025 20:13:10 +0100
From: Antheas Kapenekakis <lkml@...heas.dev>
To: platform-driver-x86@...r.kernel.org,
linux-input@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <bentiss@...nel.org>,
Corentin Chary <corentin.chary@...il.com>,
"Luke D . Jones" <luke@...nes.dev>,
Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Antheas Kapenekakis <lkml@...heas.dev>
Subject: [PATCH 02/11] HID: asus: cleanup keyboard backlight check
Currently, asus_kbd_get_functions does a set_report
to query for the keyboard backlight status using a varying
report id. However, it then does get_report with the fixed
id 0x5a. The ids of get_report and set_report should always
match. Therefore, remove the calling argument and force 0x5a.
Signed-off-by: Antheas Kapenekakis <lkml@...heas.dev>
---
drivers/hid/hid-asus.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index aa4a481dc4f27..bcc317057b465 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -427,10 +427,9 @@ static int asus_kbd_init(struct hid_device *hdev)
}
static int asus_kbd_get_functions(struct hid_device *hdev,
- unsigned char *kbd_func,
- u8 report_id)
+ unsigned char *kbd_func)
{
- const u8 buf[] = { report_id, 0x05, 0x20, 0x31, 0x00, 0x08 };
+ const u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x05, 0x20, 0x31, 0x00, 0x08 };
u8 *readbuf;
int ret;
@@ -572,7 +571,7 @@ static int asus_kbd_register_leds(struct hid_device *hdev)
return ret;
/* Get keyboard functions */
- ret = asus_kbd_get_functions(hdev, &kbd_func, FEATURE_KBD_REPORT_ID);
+ ret = asus_kbd_get_functions(hdev, &kbd_func);
if (ret < 0)
return ret;
--
2.48.1
Powered by blists - more mailing lists