From: Zhang, Rui Date: Thu, 10 Apr 2008 08:20:23 +0000 (+0800) Subject: ACPI: update thermal temperature X-Git-Tag: v2.6.25.15~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab2717e0c2838386494946cbfe73c0982bd0faea;p=thirdparty%2Fkernel%2Fstable.git ACPI: update thermal temperature 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 Acked-by: Jean Delvare Signed-off-by: Len Brown Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index bc5fcc2109cc3..a32aed9c390e7 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -891,10 +891,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)); }