diff options
author | Zhang, Rui <rui.zhang@intel.com> | 2008-04-10 16:20:23 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-06 10:11:04 -0700 |
commit | ab2717e0c2838386494946cbfe73c0982bd0faea (patch) | |
tree | 9497e521e8717fed845f3f73cfb1677fb435763a | |
parent | a48b0ab0a17f7cbc5dfef2546b670e61eeea0126 (diff) | |
download | lwn-ab2717e0c2838386494946cbfe73c0982bd0faea.tar.gz lwn-ab2717e0c2838386494946cbfe73c0982bd0faea.zip |
ACPI: update thermal temperature
commit 76ecb4f2d7ea5c3aac8970b9529775316507c6d2 upstream
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/acpi/thermal.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index bc5fcc2109cc..a32aed9c390e 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -891,10 +891,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)); } |