Skip to content

Commit

Permalink
thermal: intel_pch_thermal: fix build for ACPI not enabled
Browse files Browse the repository at this point in the history
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: ef63b04 ("thermal: intel: pch: fix S0ix failure due to PCH temperature above threshold")
Signed-off-by: Randy Dunlap <[email protected]>
Cc: Sumeet Pawnikar <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Amit Kucheria <[email protected]>
Cc: [email protected]
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
rddunlap authored and dlezcano committed Nov 17, 2020
1 parent cb68a85 commit be13372
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/thermal/intel/intel_pch_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit be13372

Please sign in to comment.