mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
ACPI: update thermal temperature
Fix the problem that thermal_get_temp returns the cached value, which causes the temperature in generic thermal never updates. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
9030062f3d
commit
76ecb4f2d7
1 changed files with 5 additions and 0 deletions
|
@ -884,10 +884,15 @@ static void acpi_thermal_check(void *data)
|
|||
static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf)
|
||||
{
|
||||
struct acpi_thermal *tz = thermal->devdata;
|
||||
int result;
|
||||
|
||||
if (!tz)
|
||||
return -EINVAL;
|
||||
|
||||
result = acpi_thermal_get_temperature(tz);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(tz->temperature));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue