aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-11-17 12:53:21 +0000
committerMark Brown <broonie@kernel.org>2014-11-17 12:53:21 +0000
commitd18b9ba808322f843375c262a7df889ff406a71c (patch)
tree413d783dfca6879dcb17931b4bdb87d74e506112
parent8eb52971d4749c0192358e1942ca83d8dc7e686b (diff)
parent212df5dd3212092602119d03a2f5d3a27be77ce4 (diff)
downloadlinux-linaro-stable-d18b9ba808322f843375c262a7df889ff406a71c.tar.gz
Merge remote-tracking branch 'lsk/v3.10/topic/cpufreq' into linux-linaro-lsk
-rw-r--r--drivers/cpufreq/cpufreq.c56
1 files changed, 19 insertions, 37 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index ce94c323fa13..df9a2427c233 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1295,7 +1295,6 @@ static struct subsys_interface cpufreq_interface = {
void cpufreq_suspend(void)
{
struct cpufreq_policy *policy;
- int cpu;
if (!cpufreq_driver)
return;
@@ -1305,20 +1304,15 @@ void cpufreq_suspend(void)
pr_debug("%s: Suspending Governors\n", __func__);
- for_each_possible_cpu(cpu) {
- if (!cpu_online(cpu))
- continue;
-
- policy = cpufreq_cpu_get(cpu);
+ policy = cpufreq_cpu_get(0);
- if (__cpufreq_governor(policy, CPUFREQ_GOV_STOP))
- pr_err("%s: Failed to stop governor for policy: %p\n",
- __func__, policy);
- else if (cpufreq_driver->suspend
- && cpufreq_driver->suspend(policy))
- pr_err("%s: Failed to suspend driver: %p\n", __func__,
- policy);
- }
+ if (__cpufreq_governor(policy, CPUFREQ_GOV_STOP))
+ pr_err("%s: Failed to stop governor for policy: %p\n",
+ __func__, policy);
+ else if (cpufreq_driver->suspend
+ && cpufreq_driver->suspend(policy))
+ pr_err("%s: Failed to suspend driver: %p\n", __func__,
+ policy);
cpufreq_suspended = true;
}
@@ -1332,7 +1326,6 @@ void cpufreq_suspend(void)
void cpufreq_resume(void)
{
struct cpufreq_policy *policy;
- int cpu;
if (!cpufreq_driver)
return;
@@ -1344,29 +1337,18 @@ void cpufreq_resume(void)
cpufreq_suspended = false;
- for_each_possible_cpu(cpu) {
- if (!cpu_online(cpu))
- continue;
+ policy = cpufreq_cpu_get(0);
- policy = cpufreq_cpu_get(cpu);
-
- if (__cpufreq_governor(policy, CPUFREQ_GOV_START)
- || __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))
- pr_err("%s: Failed to start governor for policy: %p\n",
- __func__, policy);
- else if (cpufreq_driver->resume
- && cpufreq_driver->resume(policy))
- pr_err("%s: Failed to resume driver: %p\n", __func__,
- policy);
-
- /*
- * schedule call cpufreq_update_policy() for boot CPU, i.e. last
- * policy in list. It will verify that the current freq is in
- * sync with what we believe it to be.
- */
- if (cpu == 0)
- schedule_work(&policy->update);
- }
+ if (__cpufreq_governor(policy, CPUFREQ_GOV_START)
+ || __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))
+ pr_err("%s: Failed to start governor for policy: %p\n",
+ __func__, policy);
+ else if (cpufreq_driver->resume
+ && cpufreq_driver->resume(policy))
+ pr_err("%s: Failed to resume driver: %p\n", __func__,
+ policy);
+
+ schedule_work(&policy->update);
}
/**