platform/x86: panasonic-laptop: de-obfuscate button codes
authorStefan Seyfried <seife+kernel@b1-systems.com>
Fri, 24 Jun 2022 11:23:35 +0000 (13:23 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 28 Jun 2022 19:53:35 +0000 (21:53 +0200)
commit65a3e6c8d3f7c346813a05f3d76fc46b640d76d6
treebea80e881a4a965efb7105318fda5ef8cf7dd227
parent3a0cf7ab8df3878a7e2f3d29275b785cf4e7afb6
platform/x86: panasonic-laptop: de-obfuscate button codes

In the definition of panasonic_keymap[] the key codes are given in
decimal, later checks are done with hexadecimal values, which does
not help in understanding the code.
Additionally use two helper variables to shorten the code and make
the logic more obvious.

Fixes: ed83c9171829 ("platform/x86: panasonic-laptop: Resolve hotkey double trigger bug")
Signed-off-by: Stefan Seyfried <seife+kernel@b1-systems.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220624112340.10130-3-hdegoede@redhat.com
drivers/platform/x86/panasonic-laptop.c