summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorJunjie Wu <junjiew@codeaurora.org>2015-04-13 17:33:11 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:02:56 -0700
commit1502197f640ecfbd0665e998c3b3668bb8e32a20 (patch)
tree2143e063dea7f3e28188b961e061fc0c539ad74b /drivers/cpufreq
parent14d4d12ad6a24a04026709266b121bfa6f8eb3cd (diff)
qcom-cpufreq: Use new cpufreq_freq_transition_begin/end() API
Previous cpufreq_notify_transition() is deprecated in favor of cpufreq_freq_transition_begin/end() API which provides serialization guarantee for notifications. Use the new API for transition notification. Change-Id: I8d559e5c6ef4771986b24e017c900476da1f6cdf Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/qcom-cpufreq.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/cpufreq/qcom-cpufreq.c b/drivers/cpufreq/qcom-cpufreq.c
index 519bc4391954..9e7d3f4a49f5 100644
--- a/drivers/cpufreq/qcom-cpufreq.c
+++ b/drivers/cpufreq/qcom-cpufreq.c
@@ -54,17 +54,15 @@ static int set_cpu_freq(struct cpufreq_policy *policy, unsigned int new_freq,
freqs.new = new_freq;
freqs.cpu = policy->cpu;
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
-
trace_cpu_frequency_switch_start(freqs.old, freqs.new, policy->cpu);
+ cpufreq_freq_transition_begin(policy, &freqs);
rate = new_freq * 1000;
rate = clk_round_rate(cpu_clk[policy->cpu], rate);
ret = clk_set_rate(cpu_clk[policy->cpu], rate);
- if (!ret) {
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
+ cpufreq_freq_transition_end(policy, &freqs, ret);
+ if (!ret)
trace_cpu_frequency_switch_end(policy->cpu);
- }
return ret;
}