Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: corsair: fix mapping of non-keyboard usages

This fixes a bug where the Volume Up key was ignored because it uses the same usage code as G18. Special Corsair usage codes are in the keyboard page, other pages should be left to the generic driver.

Signed-off-by: Clément Vuchener <clement.vuchener@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Clément Vuchener and committed by
Jiri Kosina
e791f7b1 4392bf33

+3
+3
drivers/hid/hid-corsair.c
··· 595 595 { 596 596 int gkey; 597 597 598 + if ((usage->hid & HID_USAGE_PAGE) != HID_UP_KEYBOARD) 599 + return 0; 600 + 598 601 gkey = corsair_usage_to_gkey(usage->hid & HID_USAGE); 599 602 if (gkey != 0) { 600 603 hid_map_usage_clear(input, usage, bit, max, EV_KEY,