]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
platform/x86: thinkpad_acpi: guard generic hotkey case
authorChristian Kellner <christian@kellner.me>
Wed, 19 Jul 2017 04:56:57 +0000 (21:56 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 9 Aug 2017 14:37:19 +0000 (16:37 +0200)
commitacd39f35dc481c64417d98aa30fecc1044823663
treee58b510912a4415c248d50dd32e3d43d78fb35b7
parent8b0fde5cf2f26f5a7bf12b4459a100867eba27a0
platform/x86: thinkpad_acpi: guard generic hotkey case

BugLink: http://bugs.launchpad.net/bugs/1705169
Currently when dispatching hotkeys we check if the scancode is in
the range of 0 and TPACPI_HOTKEY_MAP_LEN, although the bottom 20
entries in the hotkey keymap are already adaptive keycodes.
Therefore we introduce a TP_ACPI_HOTKEYSCAN_ADAPTIVE_START and
ensure that we are in the range 0 and ADAPTIVE_START for the generic
keycode case.

Signed-off-by: Christian Kellner <ckellner@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
(cherry picked from commit 149c8c75b38be528b8648d907195f188bc8fb0fb)
Signed-off-by: Alex Hung <alex.hung@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>
Acked-by: Hui Wang <Wang <hui.wang@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/platform/x86/thinkpad_acpi.c