aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-04-01 12:57:43 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-02 15:10:48 +0200
commit746b3df98b2edc0e0844537a247e820ac6503031 (patch)
treefacb9d766dcbdb30603540a9550a6720459f8591 /drivers/cpufreq
parentcpufreq: Documentation: Fix cpufreq_frequency_table name (diff)
downloadlinux-dev-746b3df98b2edc0e0844537a247e820ac6503031.tar.xz
linux-dev-746b3df98b2edc0e0844537a247e820ac6503031.zip
cpufreq: cpufreq-cpu0: No need to check cpu number in init()
It is not possible for init() to be called for any cpu other than cpu0. During bootup whatever cpu is used to boot system will be assigned as cpu0. And later on policy->cpu can only change if we hotunplug all cpus first and then hotplug them back in different order, which isn't possible (system requires atleast one cpu to be up always :)). Though I can see one situation where policy->cpu can be different then zero. - Hot-unplug cpu 0. - rmmod cpufreq-cpu0 module - insmod it back - hotplug cpu 0 again. Here, policy->cpu would be different. But the driver doesn't have any dependency on cpu0 as such. We don't mind which cpu of a system is policy->cpu and so this check is just not required. Remove it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq-cpu0.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index 6bb88af6b5d0..4c5a4cfab3e5 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -130,9 +130,6 @@ static int cpu0_cpufreq_init(struct cpufreq_policy *policy)
{
int ret;
- if (policy->cpu != 0)
- return -EINVAL;
-
ret = cpufreq_frequency_table_cpuinfo(policy, freq_table);
if (ret) {
pr_err("invalid frequency table: %d\n", ret);