platform/x86: toshiba_acpi: Fix quickstart quirk handling
authorArmin Wolf <W_Armin@gmx.de>
Mon, 1 Jul 2024 19:45:39 +0000 (21:45 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 2 Jul 2024 14:01:45 +0000 (16:01 +0200)
commite527a6127223b644e0a27b44f4b16e16eb6c7f0a
treeed00e6623c31de677bffc525f14c74c8d4ad6f50
parent7add1ee34692aabd146b86a8e88abad843ed6659
platform/x86: toshiba_acpi: Fix quickstart quirk handling

The global hci_hotkey_quickstart quirk flag is tested in
toshiba_acpi_enable_hotkeys() before the quirk flag is properly
initialized based on SMBIOS data. This causes the quirk to be
applied to all models, some of which behave erratically as a
result.

Fix this by initializing the global quirk flags during module
initialization before registering the ACPI driver. This also
allows us to mark toshiba_dmi_quirks[] as __initconst.

Fixes: 23f1d8b47d12 ("platform/x86: toshiba_acpi: Add quirk for buttons on Z830")
Reported-by: kemal <kmal@cock.li>
Closes: https://lore.kernel.org/platform-driver-x86/R4CYFS.TWB8QUU2SHWI1@cock.li/
Tested-by: kemal <kmal@cock.li>
Cc: stable@vger.kernel.org
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20240701194539.348937-1-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/toshiba_acpi.c