aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNi Wade <wni@nvidia.com>2014-02-16 22:02:55 -0500
committerZhang Rui <rui.zhang@intel.com>2014-03-03 10:15:29 -0500
commit5ca0cce5622bf476e3e6bf627fe8e9381d6ae174 (patch)
tree3f8e52c50a333eb6c87e7896f29fd0d0e896150a
parentd1c8b0410b77f1e43f97cd22bc7e0a71a5305840 (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>
-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 338a88bf6662..02f57af04e3f 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -1107,7 +1107,7 @@ __thermal_cooling_device_register(struct device_node *np,
1107 INIT_LIST_HEAD(&cdev->thermal_instances); 1107 INIT_LIST_HEAD(&cdev->thermal_instances);
1108 cdev->np = np; 1108 cdev->np = np;
1109 cdev->ops = ops; 1109 cdev->ops = ops;
1110 cdev->updated = true; 1110 cdev->updated = false;
1111 cdev->device.class = &thermal_class; 1111 cdev->device.class = &thermal_class;
1112 cdev->devdata = devdata; 1112 cdev->devdata = devdata;
1113 dev_set_name(&cdev->device, "cooling_device%d", cdev->id); 1113 dev_set_name(&cdev->device, "cooling_device%d", cdev->id);