From: "hongbo.zhang" <hongbo.zh...@linaro.com> A cooling device should be set to state zero when it is unbound.
Signed-off-by: hongbo.zhang <hongbo.zh...@linaro.com> --- drivers/thermal/thermal_sys.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 2c28c85..efc5c56 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c @@ -885,6 +885,8 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz, mutex_lock(&tz->lock); list_for_each_entry_safe(pos, next, &tz->cooling_devices, node) { if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { + if (cdev->ops->set_cur_state) + cdev->ops->set_cur_state(cdev, 0); list_del(&pos->node); mutex_unlock(&tz->lock); goto unbind; -- 1.7.11.3 _______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev