提交 c098ea74 编写于 作者: J Jonghwan Choi 提交者: Kukjin Kim

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: NJonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: NKukjin Kim <kgene.kim@samsung.com>
上级 229b21e2
......@@ -69,9 +69,10 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
int ret = 0;
freqs.old = policy->cur;
freqs.new = target_freq;
freqs.cpu = policy->cpu;
if (target_freq == freqs.old)
if (freqs.new == freqs.old)
goto out;
/*
......@@ -159,6 +160,7 @@ static int exynos_target(struct cpufreq_policy *policy,
{
struct cpufreq_frequency_table *freq_table = exynos_info->freq_table;
unsigned int index;
unsigned int new_freq;
int ret = 0;
mutex_lock(&cpufreq_lock);
......@@ -172,9 +174,9 @@ static int exynos_target(struct cpufreq_policy *policy,
goto out;
}
freqs.new = freq_table[index].frequency;
new_freq = freq_table[index].frequency;
ret = exynos_cpufreq_scale(freqs.new);
ret = exynos_cpufreq_scale(new_freq);
out:
mutex_unlock(&cpufreq_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册