]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit15a1a6167de0cf2c8f2aedae26f4fc2a5e6e1553
tree2bae89136a8a66955464411365b69a100bddc4ab
parenteccc979881e8affc5f72234076c17e820d195b2a
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