diff options
author | Zhang, Rui <rui.zhang@intel.com> | 2008-04-10 08:20:23 (GMT) |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-29 06:53:42 (GMT) |
commit | 76ecb4f2d7ea5c3aac8970b9529775316507c6d2 (patch) | |
tree | 313f2bb9b6f5ef62dbf08f587c3a71b9bcae1eef /drivers/acpi | |
parent | 9030062f3d61f87c1e787b3aa134fa3a8e4b2d25 (diff) | |
download | linux-76ecb4f2d7ea5c3aac8970b9529775316507c6d2.tar.xz |
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>
Diffstat (limited to 'drivers/acpi')
-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 5e9641c..782c225 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -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)); } |