diff options
author | Eduardo Valentin <eduardo.valentin@ti.com> | 2013-06-17 21:24:24 +0800 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2013-08-15 15:49:20 +0800 |
commit | ca56caa02182044667b680154a0550ad52726584 (patch) | |
tree | f1044634952b58688c633fdddb8e838c861dfaa6 /drivers/video | |
parent | 178c2490b99f898efc06d1ad75cadc84f13021a6 (diff) |
thermal: step_wise: return instance->target by default
In case the trend is not changing or when there is no
request for throttling, it is expected that the instance
would not change its requested target. This patch improves
the code implementation to cover for this expected behavior.
With current implementation, the instance will always
reset to cdev.cur_state, even in not expected cases,
like those mentioned above.
This patch changes the step_wise governor implementation
of get_target so that we accomplish:
(a) - default value will be current instance->target, so
we do not change the thermal instance target unnecessarily.
(b) - the code now it is clear about what is the intention.
There is a clear statement of what are the expected outcomes
(c) - removal of hardcoded constants, now it is put in use
the THERMAL_NO_TARGET macro.
(d) - variable names are also improved so that reader can
clearly understand the difference between instance cur target,
next target and cdev cur_state.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Reported-by: Ruslan Ruslichenko <ruslan.ruslichenko@ti.com>
Signed-of-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/video')
0 files changed, 0 insertions, 0 deletions