From: Jonghwan Choi <jhbird.choi@xxxxxxxxxxx> When pm handler set freq & voltage, frequency mismatch occurred. Because freqs.new isn't set in pm handler. Reported-by: Abhilash Kesavan <a.kesavan@xxxxxxxxxxx> Signed-off-by: Jonghwan Choi <jhbird.choi@xxxxxxxxxxx> Cc: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> Signed-off-by: Kukjin Kim <kgene.kim@xxxxxxxxxxx> --- drivers/cpufreq/exynos-cpufreq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 6d6ba0d..48ee439 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) 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); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe cpufreq" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html