cpufreq: governor: Avoid passing dbs_data pointers around unnecessarily
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 5 Feb 2016 02:15:24 +0000 (03:15 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Mar 2016 13:40:53 +0000 (14:40 +0100)
commit5da3dd1e00918a9ac4b83885453bfa9cad732b44
tree2bae89136a8a66955464411365b69a100bddc4ab
parent2bb8d94fb03f808022c620f54b602a1e26d5cbac
cpufreq: governor: Avoid passing dbs_data pointers around unnecessarily

Do not pass struct dbs_data pointers to the family of functions
implementing governor operations in cpufreq_governor.c as they can
take that pointer from policy->governor by themselves.

The cpufreq_governor_init() case is slightly more complicated, since
policy->governor may be NULL when it is invoked, but then it can reach
the pointer in question via its cdata argument just fine.

While at it, rework cpufreq_governor_dbs() to avoid a pointless
policy_governor check in the CPUFREQ_GOV_POLICY_INIT case.

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