[PATCH v3 06/10] thermal: intel: pch: Use `pm_suspend_preferred_s2idle`
From: Mario Limonciello
Date: Thu Jun 30 2022 - 22:33:55 EST
Drop the direct check from the FADT and use the helper instead.
Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
---
drivers/thermal/intel/intel_pch_thermal.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c
index c1fa2b29b153..3124c4b1da76 100644
--- a/drivers/thermal/intel/intel_pch_thermal.c
+++ b/drivers/thermal/intel/intel_pch_thermal.c
@@ -208,12 +208,8 @@ static int pch_wpt_suspend(struct pch_thermal_device *ptd)
}
/* Do not check temperature if it is not a S0ix capable platform */
-#ifdef CONFIG_ACPI
- if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))
+ if (!pm_suspend_preferred_s2idle())
return 0;
-#else
- return 0;
-#endif
/* Do not check temperature if it is not s2idle */
if (pm_suspend_via_firmware())
--
2.34.1