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

HID: Microsoft Win8 Wireless Radio Controls cleanup

Use a better URL for the HUTRR40 Radio HID Usages documentation and use the
HID_GD_WIRELESS_RADIO_CTLS define rather then hardcoding a check for
0x0001000c.

Fixes: 61df56bef9 ("HID: Add mapping for Microsoft Win8 Wireless Radio Controls extensions")
Suggested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Hans de Goede and committed by
Jiri Kosina
6e7edabf f1918be1

+3 -4
+1 -1
drivers/hid/hid-input.c
··· 658 658 659 659 case HID_GD_RFKILL_BTN: 660 660 /* MS wireless radio ctl extension, also check CA */ 661 - if (field->application == 0x0001000c) { 661 + if (field->application == HID_GD_WIRELESS_RADIO_CTLS) { 662 662 map_key_clear(KEY_RFKILL); 663 663 /* We need to simulate the btn release */ 664 664 field->flags |= HID_MAIN_ITEM_RELATIVE;
+2 -3
include/linux/hid.h
··· 183 183 #define HID_GD_KEYPAD 0x00010007 184 184 #define HID_GD_MULTIAXIS 0x00010008 185 185 /* 186 - * Microsoft Win8 Wireless Radio Controls extensions CA, see (checked 09052017): 187 - * https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/airplane-mode-radio-management 188 - * https://web.archive.org/web/20170509144631/https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/airplane-mode-radio-management 186 + * Microsoft Win8 Wireless Radio Controls extensions CA, see: 187 + * http://www.usb.org/developers/hidpage/HUTRR40RadioHIDUsagesFinal.pdf 189 188 */ 190 189 #define HID_GD_WIRELESS_RADIO_CTLS 0x0001000c 191 190 #define HID_GD_X 0x00010030