From: viresh kumar Date: Tue, 4 Mar 2014 03:43:59 +0000 (+0800) Subject: cpufreq: move call to __find_governor() to cpufreq_init_policy() X-Git-Tag: v3.15-rc1~151^2~2^2~9^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e2c89d16d987e6e11c531b039a42d3f5f1d7c32;p=pandora-kernel.git cpufreq: move call to __find_governor() to cpufreq_init_policy() We call __find_governor() during the addition of the first CPU of each policy from __cpufreq_add_dev() to find the last governor used for this CPU before it was hot-removed. After that we call cpufreq_parse_governor() in cpufreq_init_policy(), either with this governor, or with the default governor. Right after that policy->governor is set to NULL. While that code is not functionally problematic, the structure of it is suboptimal, because some of the code required in cpufreq_init_policy() is being executed by its caller, __cpufreq_add_dev(). So, it would make more sense to get all of it together in a single place to make code more readable. Accordingly, move the code needed for policy initialization to cpufreq_init_policy() and initialize policy->governor to NULL at the beginning. In order to clean up the code a bit more, some of the #ifdefs for CONFIG_HOTPLUG_CPU are dropped too. Signed-off-by: Viresh Kumar [rjw: Changelog] Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed