]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
platform/x86: thinkpad_acpi: guard generic hotkey case
authorChristian Kellner <christian@kellner.me>
Tue, 28 Feb 2017 16:10:56 +0000 (17:10 +0100)
committerDarren Hart <dvhart@infradead.org>
Wed, 15 Mar 2017 05:57:12 +0000 (22:57 -0700)
commit149c8c75b38be528b8648d907195f188bc8fb0fb
treef213e9083198c7ac93dffdd6f8485f7e0588c886
parentfaf667efdbe5f6c8d6962aab8680680838678097
platform/x86: thinkpad_acpi: guard generic hotkey case

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>
drivers/platform/x86/thinkpad_acpi.c