Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thermal: Bind cooling devices with the correct arguments

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>

authored by

Punit Agrawal and committed by
Zhang Rui
dd354b84 ca9521b7

+2 -2
+2 -2
drivers/thermal/of-thermal.c
··· 156 156 157 157 ret = thermal_zone_bind_cooling_device(thermal, 158 158 tbp->trip_id, cdev, 159 - tbp->min, 160 - tbp->max); 159 + tbp->max, 160 + tbp->min); 161 161 if (ret) 162 162 return ret; 163 163 }