aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/thermal.c
diff options
context:
space:
mode:
authorZhang, Rui <rui.zhang@intel.com>2008-04-10 04:20:23 -0400
committerLen Brown <len.brown@intel.com>2008-04-29 02:53:42 -0400
commit76ecb4f2d7ea5c3aac8970b9529775316507c6d2 (patch)
tree313f2bb9b6f5ef62dbf08f587c3a71b9bcae1eef /drivers/acpi/thermal.c
parent9030062f3d61f87c1e787b3aa134fa3a8e4b2d25 (diff)
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/thermal.c')
-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 5e9641c93fcd..782c2250443e 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -884,10 +884,15 @@ static void acpi_thermal_check(void *data)
884static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf) 884static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf)
885{ 885{
886 struct acpi_thermal *tz = thermal->devdata; 886 struct acpi_thermal *tz = thermal->devdata;
887 int result;
887 888
888 if (!tz) 889 if (!tz)
889 return -EINVAL; 890 return -EINVAL;
890 891
892 result = acpi_thermal_get_temperature(tz);
893 if (result)
894 return result;
895
891 return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(tz->temperature)); 896 return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(tz->temperature));
892} 897}
893 898