From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764323AbYHDU31 (ORCPT ); Mon, 4 Aug 2008 16:29:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1764285AbYHDU27 (ORCPT ); Mon, 4 Aug 2008 16:28:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:46019 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763843AbYHDU26 (ORCPT ); Mon, 4 Aug 2008 16:28:58 -0400 Date: Mon, 4 Aug 2008 13:16:07 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Zhang Rui , Jean Delvare , Len Brown Subject: [patch 23/33] ACPI: update thermal temperature Message-ID: <20080804201607.GX1139@suse.de> References: <20080804200515.110033151@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="acpi-update-thermal-temperature.patch" In-Reply-To: <20080804201321.GA1139@suse.de> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2.6.25-stable review patch. If anyone has any objections, please let us know. ------------------ From: Zhang, Rui 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 --- 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)); } --