From: Zhang, Rui Date: Thu, 10 Apr 2008 08:20:23 +0000 (+0800) Subject: ACPI: update thermal temperature X-Git-Tag: v2.6.26-rc1~101^2~1^11~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76ecb4f2d7ea5c3aac8970b9529775316507c6d2;p=linux-2.6 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 Acked-by: Jean Delvare Signed-off-by: Len Brown --- diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 5e9641c93f..782c225044 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)); }