diff options
author | Ni Wade <wni@nvidia.com> | 2014-02-17 11:02:55 +0800 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2014-03-03 23:15:29 +0800 |
commit | 5ca0cce5622bf476e3e6bf627fe8e9381d6ae174 (patch) | |
tree | 3f8e52c50a333eb6c87e7896f29fd0d0e896150a /drivers/thermal | |
parent | d1c8b0410b77f1e43f97cd22bc7e0a71a5305840 (diff) | |
download | linux-5ca0cce5622bf476e3e6bf627fe8e9381d6ae174.tar.bz2 |
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>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/thermal_core.c | 2 |
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, 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); |