platform/x86: thinkpad_acpi: Simplify thermal mode checking
authorVishnu Sankar <vishnuocv@gmail.com>
Thu, 15 Feb 2024 13:41:01 +0000 (22:41 +0900)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 20 Feb 2024 09:08:09 +0000 (11:08 +0200)
commitee8b738e7f7adf78700afd9ab9642fe015464885
tree3892f30668567d694bb6bd195907deba231886c2
parentc5211eacf3326538fbf31b612e5ea546ca8a3425
platform/x86: thinkpad_acpi: Simplify thermal mode checking

Add a thermal_read_mode_check helper to make the code
simpler during init. This helps particularly when the new
TPACPI_THERMAL_TPEC_12 mode is added in the next patch.

Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Vishnu Sankar <vishnuocv@gmail.com>
Link: https://lore.kernel.org/r/20240215134102.25118-1-vishnuocv@gmail.com
[ij: Reflowed the comment to 80 cols, multiline if braces, added __init.]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/thinkpad_acpi.c