diff mbox

thermal: Bind cooling devices with the correct arguments

Message ID 1401789598-14967-1-git-send-email-punit.agrawal@arm.com (mailing list archive)
State Accepted, archived
Delegated to: Zhang Rui
Headers show

Commit Message

Punit Agrawal June 3, 2014, 9:59 a.m. UTC
When binding cooling devices to thermal zones created from the device
tree the minimum and maximum cooling states are in the wrong order
leading to failure to bind.

Fix the order of cooling states in the call to
thermal_zone_bind_cooling_device to fix this.

Cc:Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
---
Hi Eduardo,

I am hoping this can be picked up for 3.16 as a bug fix.

Thanks,
Punit

 drivers/thermal/of-thermal.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Punit Agrawal June 17, 2014, 10:20 a.m. UTC | #1
Ping?

Punit Agrawal <punit.agrawal@arm.com> writes:

> When binding cooling devices to thermal zones created from the device
> tree the minimum and maximum cooling states are in the wrong order
> leading to failure to bind.
>
> Fix the order of cooling states in the call to
> thermal_zone_bind_cooling_device to fix this.
>
> Cc:Zhang Rui <rui.zhang@intel.com>
> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
> ---
> Hi Eduardo,
>
> I am hoping this can be picked up for 3.16 as a bug fix.
>
> Thanks,
> Punit
>
>  drivers/thermal/of-thermal.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
> index 04b1be7..97d312f 100644
> --- a/drivers/thermal/of-thermal.c
> +++ b/drivers/thermal/of-thermal.c
> @@ -156,8 +156,8 @@ static int of_thermal_bind(struct thermal_zone_device *thermal,
>  
>  			ret = thermal_zone_bind_cooling_device(thermal,
>  						tbp->trip_id, cdev,
> -						tbp->min,
> -						tbp->max);
> +						tbp->max,
> +						tbp->min);
>  			if (ret)
>  				return ret;
>  		}
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Boyd June 18, 2014, 10:17 p.m. UTC | #2
On 06/17/14 03:20, Punit Agrawal wrote:
> Ping?
>
> Punit Agrawal <punit.agrawal@arm.com> writes:
>
>> When binding cooling devices to thermal zones created from the device
>> tree the minimum and maximum cooling states are in the wrong order
>> leading to failure to bind.
>>
>> Fix the order of cooling states in the call to
>> thermal_zone_bind_cooling_device to fix this.
>>
>> Cc:Zhang Rui <rui.zhang@intel.com>
>> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>

Ah I ran into the same problem while testing out some thermal DT stuff.

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Punit Agrawal June 24, 2014, 10:43 a.m. UTC | #3
Stephen Boyd <sboyd@codeaurora.org> writes:

> On 06/17/14 03:20, Punit Agrawal wrote:
>> Ping?
>>
>> Punit Agrawal <punit.agrawal@arm.com> writes:
>>
>>> When binding cooling devices to thermal zones created from the device
>>> tree the minimum and maximum cooling states are in the wrong order
>>> leading to failure to bind.
>>>
>>> Fix the order of cooling states in the call to
>>> thermal_zone_bind_cooling_device to fix this.
>>>
>>> Cc:Zhang Rui <rui.zhang@intel.com>
>>> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
>
> Ah I ran into the same problem while testing out some thermal DT stuff.
>
> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>

Thanks Stephen!

Rui, can you pick this patch?
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Eduardo Valentin July 2, 2014, 11:54 a.m. UTC | #4
Punit,

On Tue, Jun 3, 2014 at 5:59 AM, Punit Agrawal <punit.agrawal@arm.com> wrote:
> When binding cooling devices to thermal zones created from the device
> tree the minimum and maximum cooling states are in the wrong order
> leading to failure to bind.
>
> Fix the order of cooling states in the call to
> thermal_zone_bind_cooling_device to fix this.
>
> Cc:Zhang Rui <rui.zhang@intel.com>

Acked-by: Eduardo Valentin <edubezval@gmail.com>

Rui, to avoid further delays, can you please pick this one directly?

> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
> ---
> Hi Eduardo,
>
> I am hoping this can be picked up for 3.16 as a bug fix.
>
> Thanks,
> Punit
>
>  drivers/thermal/of-thermal.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
> index 04b1be7..97d312f 100644
> --- a/drivers/thermal/of-thermal.c
> +++ b/drivers/thermal/of-thermal.c
> @@ -156,8 +156,8 @@ static int of_thermal_bind(struct thermal_zone_device *thermal,
>
>                         ret = thermal_zone_bind_cooling_device(thermal,
>                                                 tbp->trip_id, cdev,
> -                                               tbp->min,
> -                                               tbp->max);
> +                                               tbp->max,
> +                                               tbp->min);
>                         if (ret)
>                                 return ret;
>                 }
> --
> 1.7.10.4
>
diff mbox

Patch

diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
index 04b1be7..97d312f 100644
--- a/drivers/thermal/of-thermal.c
+++ b/drivers/thermal/of-thermal.c
@@ -156,8 +156,8 @@  static int of_thermal_bind(struct thermal_zone_device *thermal,
 
 			ret = thermal_zone_bind_cooling_device(thermal,
 						tbp->trip_id, cdev,
-						tbp->min,
-						tbp->max);
+						tbp->max,
+						tbp->min);
 			if (ret)
 				return ret;
 		}