aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorJonghwan Choi <jhbird.choi@samsung.com>2013-02-05 00:01:22 -0500
committerKukjin Kim <kgene.kim@samsung.com>2013-02-05 00:01:22 -0500
commitc098ea74b268969bde5aaf1689b61d236abf82f5 (patch)
treefd8ecf1fe080f22c7b0d34210e8fbdb8915e327a /drivers/cpufreq
parent229b21e2b75302d6d1b931031ae7d53e1a4d0830 (diff)
cpufreq: exynos: Fix hang in pm handler due to frequency mismatch
When pm handler set freq & voltage, frequency mismatch occurred. Because freqs.new isn't set in pm handler. Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/exynos-cpufreq.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index f48ba5260e08..67e89ef55168 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -69,9 +69,10 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
69 int ret = 0; 69 int ret = 0;
70 70
71 freqs.old = policy->cur; 71 freqs.old = policy->cur;
72 freqs.new = target_freq;
72 freqs.cpu = policy->cpu; 73 freqs.cpu = policy->cpu;
73 74
74 if (target_freq == freqs.old) 75 if (freqs.new == freqs.old)
75 goto out; 76 goto out;
76 77
77 /* 78 /*
@@ -159,6 +160,7 @@ static int exynos_target(struct cpufreq_policy *policy,
159{ 160{
160 struct cpufreq_frequency_table *freq_table = exynos_info->freq_table; 161 struct cpufreq_frequency_table *freq_table = exynos_info->freq_table;
161 unsigned int index; 162 unsigned int index;
163 unsigned int new_freq;
162 int ret = 0; 164 int ret = 0;
163 165
164 mutex_lock(&cpufreq_lock); 166 mutex_lock(&cpufreq_lock);
@@ -172,9 +174,9 @@ static int exynos_target(struct cpufreq_policy *policy,
172 goto out; 174 goto out;
173 } 175 }
174 176
175 freqs.new = freq_table[index].frequency; 177 new_freq = freq_table[index].frequency;
176 178
177 ret = exynos_cpufreq_scale(freqs.new); 179 ret = exynos_cpufreq_scale(new_freq);
178 180
179out: 181out:
180 mutex_unlock(&cpufreq_lock); 182 mutex_unlock(&cpufreq_lock);