summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang, Rui <rui.zhang@intel.com>2008-04-10 16:20:23 +0800
committerLen Brown <len.brown@intel.com>2008-04-29 02:53:42 -0400
commit76ecb4f2d7ea5c3aac8970b9529775316507c6d2 (patch)
tree313f2bb9b6f5ef62dbf08f587c3a71b9bcae1eef
parent9030062f3d61f87c1e787b3aa134fa3a8e4b2d25 (diff)
downloadop-kernel-dev-76ecb4f2d7ea5c3aac8970b9529775316507c6d2.zip
op-kernel-dev-76ecb4f2d7ea5c3aac8970b9529775316507c6d2.tar.gz
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>
-rw-r--r--drivers/acpi/thermal.c5
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));
}
OpenPOWER on IntegriCloud