HID: hid-appletb-kbd: simplify logic used to switch between media and function keys...
authorAditya Garg <gargaditya08@live.com>
Mon, 17 Feb 2025 04:43:56 +0000 (04:43 +0000)
committerJiri Kosina <jkosina@suse.com>
Tue, 18 Feb 2025 21:01:54 +0000 (22:01 +0100)
commit534bac4f126bc3a97c93c5757e17f533a9f598b4
treee4a38401278b2e11c6706d734e7ddf373e565205
parenta4fa2e6bfe6be8f8b4cc4cf9bf75a26b7da7c1b5
HID: hid-appletb-kbd: simplify logic used to switch between media and function keys on pressing fn key

This commit simplifies the logic in appletb_kbd_inp_event used for
switching between the media and function keys on pressing the fn key.

We now also prevent touching the kbd->saved_mode variable in case the esc
key only mode is chosen.

The following small fixes have also been done in this patch:

- A small comment style error has been fixed
- Fixed spelling in MODULE_DESCRIPTION
- I have added myself to MODULE_AUTHOR

Signed-off-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-appletb-kbd.c