From: Viresh Kumar Date: Tue, 12 May 2015 06:52:12 +0000 (+0530) Subject: cpufreq: Don't traverse all active policies to find policy for a cpu X-Git-Tag: omap-for-v4.2/fixes-rc1^2~154^2~7^2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9104bb26c740cd4b2c9ee927f3caabbde0414558;p=pandora-kernel.git 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 Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed