aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNi Wade <wni@nvidia.com>2014-02-17 11:02:55 +0800
committerAlex Shi <alex.shi@linaro.org>2014-09-25 17:06:17 +0800
commited835be313220380ccacadc959f7d4d64324d9ee (patch)
tree2ace9a1584750c00b8b91141cba4d353b527ae6b
parentfe174a059c03451611cbefa828f6efc76fc5ac78 (diff)
Thermal: Allow first update of cooling device state
In initialization, if the cooling device is initialized at max cooling state, and the thermal zone temperature is below the first trip point, then the cooling state can't be updated to the right state, untill the first trip point be triggered. To fix this issue, allow first update of cooling device state during registration, initialized "updated" device field as "false" (instead of "true"). Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> (cherry picked from commit 5ca0cce5622bf476e3e6bf627fe8e9381d6ae174) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--drivers/thermal/thermal_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 561d61d72137..07d80cc0a91b 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -1099,7 +1099,7 @@ __thermal_cooling_device_register(struct device_node *np,
INIT_LIST_HEAD(&cdev->thermal_instances);
cdev->np = np;
cdev->ops = ops;
- cdev->updated = true;
+ cdev->updated = false;
cdev->device.class = &thermal_class;
cdev->devdata = devdata;
dev_set_name(&cdev->device, "cooling_device%d", cdev->id);