]> git.baikalelectronics.ru Git - 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)
commit32fc8ec96f58a611abdb27e5cf672f7e3b6ec428
treef213e9083198c7ac93dffdd6f8485f7e0588c886
parent5ff7d728bd6076eb5db0b0784876de0353b6b18b
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