[PATCH 6/6] ACPI: update thermal temperature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 at 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 at linux-fr.org>

-- 
Jean Delvare




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux