]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ACPI: update thermal temperature
authorZhang, Rui <rui.zhang@intel.com>
Thu, 10 Apr 2008 08:20:23 +0000 (16:20 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Aug 2008 17:11:04 +0000 (10:11 -0700)
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 <rui.zhang@intel.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/acpi/thermal.c

index bc5fcc2109cc335e7fa7dd7afc43b300999d199a..a32aed9c390e7176ee5d8ceb79022fc529ab3bca 100644 (file)
@@ -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));
 }