Skip to content

Commit 4ac74ea

Browse files
antheasij-intel
authored andcommitted
HID: asus: early return for ROG devices
Some ROG devices have a new dynamic backlight interface for control by Windows. This interface does not create an ->input device, causing the kernel to print an error message and to eject it. In addition, ROG devices have proper HID names in their descriptors so renaming them is not necessary. Therefore, if a device is identified as ROG, early return from probe to skip renaming and ->input checks. Acked-by: Benjamin Tissoires <bentiss@kernel.org> Reviewed-by: Denis Benato <benato.denis96@gmail.com> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> Link: https://patch.msgid.link/20260122075044.5070-7-lkml@antheas.dev Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent 2b92b79 commit 4ac74ea

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/hid/hid-asus.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,13 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
12321232
asus_kbd_register_leds(hdev))
12331233
hid_warn(hdev, "Failed to initialize backlight.\n");
12341234

1235+
/*
1236+
* For ROG keyboards, skip rename for consistency and ->input check as
1237+
* some devices do not have inputs.
1238+
*/
1239+
if (drvdata->quirks & QUIRK_ROG_NKEY_KEYBOARD)
1240+
return 0;
1241+
12351242
/*
12361243
* Check that input registration succeeded. Checking that
12371244
* HID_CLAIMED_INPUT is set prevents a UAF when all input devices

0 commit comments

Comments
 (0)