]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86: acer-wmi: Fix initialization of last_non_turbo_profile
authorArmin Wolf <W_Armin@gmx.de>
Sun, 19 Jan 2025 20:17:23 +0000 (21:17 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 20 Jan 2025 12:16:59 +0000 (14:16 +0200)
commit3ef4ea516c2f8a2f1ff8ca59b156fb2e4472c2a4
treeb5bfa534e8d1013bafb82f0af3fe4348641c3bf6
parentf6bfa25c6665f8721421ea94fe506cc22f1d4b43
platform/x86: acer-wmi: Fix initialization of last_non_turbo_profile

On machines that do not support the balanced profile the value of
last_non_turbo_profile is invalid after initialization which might
cause the driver to switch to an unsupported platform profile later.

Fix this by only setting last_non_turbo_profile to supported platform
profile values.

Fixes: 191e21f1a4c3 ("platform/x86: acer-wmi: use an ACPI bitmap to set the platform profile choices")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Tested-by: Hridesh MG <hridesh699@gmail.com>
Reviewed-by: Hridesh MG <hridesh699@gmail.com>
Link: https://lore.kernel.org/r/20250119201723.11102-3-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/acer-wmi.c