diff mbox series

[1/3] HID: apple: Do not reset quirks when the Fn key is not found

Message ID 20211118072955.29708-1-jose.exposito89@gmail.com (mailing list archive)
State Mainlined
Commit a5fe7864d8ada170f19cc47d176bf8260ffb4263
Delegated to: Jiri Kosina
Headers show
Series [1/3] HID: apple: Do not reset quirks when the Fn key is not found | expand

Commit Message

José Expósito Nov. 18, 2021, 7:29 a.m. UTC
When a keyboard without a function key is detected, instead of removing
all quirks, remove only the APPLE_HAS_FN quirk.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/hid/hid-apple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jiri Kosina Nov. 19, 2021, 3:05 p.m. UTC | #1
On Thu, 18 Nov 2021, José Expósito wrote:

> When a keyboard without a function key is detected, instead of removing
> all quirks, remove only the APPLE_HAS_FN quirk.
> 
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>

The series is now in hid.git#for-5.17/apple. Thanks,
diff mbox series

Patch

diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 2c9c5faa74a9..a4ca5ed00e5f 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -428,7 +428,7 @@  static int apple_input_configured(struct hid_device *hdev,
 
 	if ((asc->quirks & APPLE_HAS_FN) && !asc->fn_found) {
 		hid_info(hdev, "Fn key not found (Apple Wireless Keyboard clone?), disabling Fn key handling\n");
-		asc->quirks = 0;
+		asc->quirks &= ~APPLE_HAS_FN;
 	}
 
 	return 0;