* [PATCH 6/6] ACPI: update thermal temperature
@ 2008-04-10 8:20 Zhang, Rui
2008-04-17 12:21 ` Jean Delvare
0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Rui @ 2008-04-10 8:20 UTC (permalink / raw)
To: Len Brown; +Cc: Jean Delvare, linux-acpi, lm-sensors
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>
---
drivers/acpi/thermal.c | 5 +++++
1 file changed, 5 insertions(+)
Index: linux-2.6/drivers/acpi/thermal.c
===================================================================
--- linux-2.6.orig/drivers/acpi/thermal.c
+++ linux-2.6/drivers/acpi/thermal.c
@@ -884,10 +884,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));
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 6/6] ACPI: update thermal temperature
2008-04-10 8:20 [PATCH 6/6] ACPI: update thermal temperature Zhang, Rui
@ 2008-04-17 12:21 ` Jean Delvare
2008-04-29 7:16 ` Len Brown
0 siblings, 1 reply; 3+ messages in thread
From: Jean Delvare @ 2008-04-17 12:21 UTC (permalink / raw)
To: Zhang, Rui; +Cc: linux-acpi, lm-sensors, Len Brown
Hi Rui,
On Thu, 10 Apr 2008 16:20:23 +0800, Zhang, Rui wrote:
> 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>
> ---
> drivers/acpi/thermal.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> Index: linux-2.6/drivers/acpi/thermal.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/thermal.c
> +++ linux-2.6/drivers/acpi/thermal.c
> @@ -884,10 +884,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));
> }
>
Yes, this fixes the problem I reported, thank you.
Acked-by: Jean Delvare <khali@linux-fr.org>
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 6/6] ACPI: update thermal temperature
2008-04-17 12:21 ` Jean Delvare
@ 2008-04-29 7:16 ` Len Brown
0 siblings, 0 replies; 3+ messages in thread
From: Len Brown @ 2008-04-29 7:16 UTC (permalink / raw)
To: Jean Delvare; +Cc: Zhang, Rui, linux-acpi, lm-sensors
On Thursday 17 April 2008, Jean Delvare wrote:
> Acked-by: Jean Delvare <khali@linux-fr.org>
applied
thanks,
-len
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-29 7:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-10 8:20 [PATCH 6/6] ACPI: update thermal temperature Zhang, Rui
2008-04-17 12:21 ` Jean Delvare
2008-04-29 7:16 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox