cpufreq: conservative: Do not use transition notifications
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 13 Jun 2016 21:33:49 +0000 (23:33 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 13 Jun 2016 21:33:49 +0000 (23:33 +0200)
commitd352cf47d93e39494b44b792cca8d35a3a0bd9b3
tree90fd9360ed10da0eed160f84df423c9a687e4312
parentbb4b9933e2bc0554cf4db37aa07b19ff69a85f8f
cpufreq: conservative: Do not use transition notifications

The conservative governor registers a transition notifier so it
can update its internal requested_freq value if it falls out of the
policy->min...policy->max range, but requested_freq is not really
necessary.

That value is used to track the frequency requested by the governor
previously, but policy->cur can be used instead of it and then the
governor will not have to worry about updating the tracked value when
the current frequency changes independently (for example, as a result
of min or max changes).

Accodringly, drop requested_freq from struct cs_policy_dbs_info
and modify cs_dbs_timer() to use policy->cur instead of it.
While at it, notice that __cpufreq_driver_target() clamps its
target_freq argument between policy->min and policy->max, so
the callers of it don't have to do that and make additional
changes in cs_dbs_timer() in accordance with that.

After these changes the transition notifier used by the conservative
governor is not necessary any more, so drop it, which also makes it
possible to drop the struct cs_governor definition and simplify the
code accordingly.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/cpufreq_conservative.c