public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6/6] ACPI:  update thermal temperature
@ 2008-04-10  8:20 Zhang, Rui
  2008-04-17 12:21 ` Jean Delvare
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Rui @ 2008-04-10  8:20 UTC (permalink / raw)
  To: Len Brown; +Cc: Jean Delvare, linux-acpi, lm-sensors


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>
---
 drivers/acpi/thermal.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: linux-2.6/drivers/acpi/thermal.c
===================================================================
--- linux-2.6.orig/drivers/acpi/thermal.c
+++ linux-2.6/drivers/acpi/thermal.c
@@ -884,10 +884,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));
 }
 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-29  7:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-10  8:20 [PATCH 6/6] ACPI: update thermal temperature Zhang, Rui
2008-04-17 12:21 ` Jean Delvare
2008-04-29  7:16   ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox