[patch 23/33] ACPI: update thermal temperature

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Monday, August 4, 2008 - 1:16 pm

2.6.25-stable review patch.  If anyone has any objections, please let us
know.

------------------

From: Zhang, Rui <rui.zhang@intel.com>

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>

---
 drivers/acpi/thermal.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -891,10 +891,15 @@ static void acpi_thermal_check(void *dat
 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));
 }
 

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/33] 2.6.25-stable review cycle, Greg KH, (Mon Aug 4, 1:13 pm)
[patch 23/33] ACPI: update thermal temperature, Greg KH, (Mon Aug 4, 1:16 pm)
[patch 26/33] pci: VT3336 cant do MSI either, Greg KH, (Mon Aug 4, 1:16 pm)