All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: "Zhang, Rui" <rui.zhang@intel.com>
Cc: linux-acpi <linux-acpi@vger.kernel.org>,
	lm-sensors <lm-sensors@lm-sensors.org>,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH 6/6] ACPI:  update thermal temperature
Date: Thu, 17 Apr 2008 14:21:28 +0200	[thread overview]
Message-ID: <20080417142128.34a58bda@hyperion.delvare> (raw)
In-Reply-To: <1207815623.27304.49.camel@acpi-hp-zz.sh.intel.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Jean Delvare <khali@linux-fr.org>
To: "Zhang, Rui" <rui.zhang@intel.com>
Cc: linux-acpi <linux-acpi@vger.kernel.org>,
	lm-sensors <lm-sensors@lm-sensors.org>,
	Len Brown <lenb@kernel.org>
Subject: Re: [lm-sensors] [PATCH 6/6] ACPI:  update thermal temperature
Date: Thu, 17 Apr 2008 12:21:28 +0000	[thread overview]
Message-ID: <20080417142128.34a58bda@hyperion.delvare> (raw)
In-Reply-To: <1207815623.27304.49.camel@acpi-hp-zz.sh.intel.com>

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

  reply	other threads:[~2008-04-17 12:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-10  8:20 [PATCH 6/6] ACPI: update thermal temperature Zhang, Rui
2008-04-10  8:20 ` [lm-sensors] " Zhang, Rui
2008-04-17 12:21 ` Jean Delvare [this message]
2008-04-17 12:21   ` Jean Delvare
2008-04-29  7:16   ` Len Brown
2008-04-29  7:16     ` [lm-sensors] " Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080417142128.34a58bda@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.