diff mbox

hid: Microsoft Win8 Wireless Radio Controls cleanup

Message ID 20170511171111.11839-1-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hans de Goede May 11, 2017, 5:11 p.m. UTC
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.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/hid/hid-input.c | 2 +-
 include/linux/hid.h     | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

Comments

Jiri Kosina May 22, 2017, 12:48 p.m. UTC | #1
On Thu, 11 May 2017, Hans de Goede wrote:

> 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.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Applied to for-4.13/ite. Thanks,
diff mbox

Patch

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 79aa2f7..b91299c 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -658,7 +658,7 @@  static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 
 		case HID_GD_RFKILL_BTN:
 			/* MS wireless radio ctl extension, also check CA */
-			if (field->application == 0x0001000c) {
+			if (field->application == HID_GD_WIRELESS_RADIO_CTLS) {
 				map_key_clear(KEY_RFKILL);
 				/* We need to simulate the btn release */
 				field->flags |= HID_MAIN_ITEM_RELATIVE;
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 8a259c6..87e6fb2 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -183,9 +183,8 @@  struct hid_item {
 #define HID_GD_KEYPAD		0x00010007
 #define HID_GD_MULTIAXIS	0x00010008
 /*
- * Microsoft Win8 Wireless Radio Controls extensions CA, see (checked 09052017):
- * https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/airplane-mode-radio-management
- * https://web.archive.org/web/20170509144631/https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/airplane-mode-radio-management
+ * Microsoft Win8 Wireless Radio Controls extensions CA, see:
+ * http://www.usb.org/developers/hidpage/HUTRR40RadioHIDUsagesFinal.pdf
  */
 #define HID_GD_WIRELESS_RADIO_CTLS	0x0001000c
 #define HID_GD_X		0x00010030