From: Zhang, Rui Date: Thu, 10 Apr 2008 08:20:23 +0000 (+0800) Subject: ACPI: update thermal temperature X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=76ecb4f2d7ea5c3aac8970b9529775316507c6d2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 5e9641c93fcd..782c2250443e 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)); }