From 3b50d8ba984988c93dc7ef257cfa0c3c196cbcd4 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Thu, 7 Feb 2013 10:56:03 +0530 Subject: [PATCH] --- yaml --- r: 351046 b: refs/heads/master c: 65922465b5bc76b11181a7d3a6c936bb475775a3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/cpufreq/cpufreq.c | 17 ++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 25839128a559..d0ffea2bc4ed 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8e53695f7f1d005fd1fcd3b099cd1bd73683a9f5 +refs/heads/master: 65922465b5bc76b11181a7d3a6c936bb475775a3 diff --git a/trunk/drivers/cpufreq/cpufreq.c b/trunk/drivers/cpufreq/cpufreq.c index cd7644554a62..41d72c3aa2b2 100644 --- a/trunk/drivers/cpufreq/cpufreq.c +++ b/trunk/drivers/cpufreq/cpufreq.c @@ -852,7 +852,7 @@ static int cpufreq_add_policy_cpu(unsigned int cpu, unsigned int sibling, static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) { unsigned int j, cpu = dev->id; - int ret = -ENOMEM, found = 0; + int ret = -ENOMEM; struct cpufreq_policy *policy; unsigned long flags; #ifdef CONFIG_HOTPLUG_CPU @@ -900,6 +900,7 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) goto err_free_cpumask; policy->cpu = cpu; + policy->governor = CPUFREQ_DEFAULT_GOVERNOR; cpumask_copy(policy->cpus, cpumask_of(cpu)); /* Initially set CPU itself as the policy_cpu */ @@ -910,20 +911,6 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) init_completion(&policy->kobj_unregister); INIT_WORK(&policy->update, handle_update); - /* Set governor before ->init, so that driver could check it */ -#ifdef CONFIG_HOTPLUG_CPU - for_each_online_cpu(sibling) { - struct cpufreq_policy *cp = per_cpu(cpufreq_cpu_data, sibling); - if (cp && cp->governor && - (cpumask_test_cpu(cpu, cp->related_cpus))) { - policy->governor = cp->governor; - found = 1; - break; - } - } -#endif - if (!found) - policy->governor = CPUFREQ_DEFAULT_GOVERNOR; /* call driver. From then on the cpufreq must be able * to accept all calls to ->verify and ->setpolicy for this CPU */