thermal: Bind cooling devices with the correct arguments
authorPunit Agrawal <punit.agrawal@arm.com>
Tue, 3 Jun 2014 09:59:58 +0000 (10:59 +0100)
committerZhang Rui <rui.zhang@intel.com>
Mon, 30 Jun 2014 02:20:27 +0000 (10:20 +0800)
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>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/of-thermal.c

index a95ee2889b19cd9acbde99cb12cf7aed80a5288f..4b2b999b7611cb04390dfa1c6c3b5ac208d26069 100644 (file)
@@ -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;
                }