diff options
author | Randy Dunlap <rdunlap@infradead.org> | 2020-11-16 18:38:07 -0800 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2020-11-17 10:05:43 +0100 |
commit | be133722df5168d2f304cc59b80d3d21d6ea9433 (patch) | |
tree | 549a5c9a2c1821c1a0016f7cf7d4126fb6596f27 /drivers/thermal/intel/intel_pch_thermal.c | |
parent | cb68a8580e2086fad38597af4c60d39de8df0cde (diff) | |
download | linux-stable-be133722df5168d2f304cc59b80d3d21d6ea9433.tar.gz linux-stable-be133722df5168d2f304cc59b80d3d21d6ea9433.tar.bz2 linux-stable-be133722df5168d2f304cc59b80d3d21d6ea9433.zip |
thermal: intel_pch_thermal: fix build for ACPI not enabled
The reference to acpi_gbl_FADT causes a build error when ACPI is not
enabled. Fix by making that conditional on CONFIG_ACPI.
../drivers/thermal/intel/intel_pch_thermal.c: In function 'pch_wpt_suspend':
../drivers/thermal/intel/intel_pch_thermal.c:217:8: error: 'acpi_gbl_FADT' undeclared (first use in this function); did you mean 'acpi_get_type'?
if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))
^~~~~~~~~~~~~
Fixes: ef63b043ac86 ("thermal: intel: pch: fix S0ix failure due to PCH temperature above threshold")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Amit Kucheria <amitk@kernel.org>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201117023807.8266-1-rdunlap@infradead.org
Diffstat (limited to 'drivers/thermal/intel/intel_pch_thermal.c')
-rw-r--r-- | drivers/thermal/intel/intel_pch_thermal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c index 32e1b285d58a..d7c05c00881e 100644 --- a/drivers/thermal/intel/intel_pch_thermal.c +++ b/drivers/thermal/intel/intel_pch_thermal.c @@ -214,8 +214,12 @@ 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)) return 0; +#else + return 0; +#endif /* Do not check temperature if it is not s2idle */ if (pm_suspend_via_firmware()) |