]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: Don't traverse all active policies to find policy for a cpu
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 12 May 2015 06:52:12 +0000 (12:22 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 15 May 2015 00:38:18 +0000 (02:38 +0200)
commitb53653619f750975e026d961daa96fb42f6eaf42
tree5852c9111d6d152c5f12b01d08ffd6c6e26b902e
parentb57bc08db2c2029b03aff3be71607bfacd4dfdb5
cpufreq: Don't traverse all active policies to find policy for a cpu

We reach here while adding policy for a CPU and enter into the 'if'
block only if a policy already exists for the CPU.

As cpufreq_cpu_data is set for all policy->related_cpus now, when the
policy is first added, we can use that to find the CPU's policy instead
of traversing the list of all active policies.

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