cpufreq: Convert existing drivers to use cpufreq_freq_transition_{begin|end}
CPUFreq core has new infrastructure that would guarantee serialized calls to target() or target_index() callbacks. These are called cpufreq_freq_transition_begin() and cpufreq_freq_transition_end(). This patch converts existing drivers to use these new set of routines. Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
12478cf0c5
commit
8fec051eea
@@ -68,10 +68,10 @@ static int sh_cpufreq_target(struct cpufreq_policy *policy,
|
||||
freqs.new = (freq + 500) / 1000;
|
||||
freqs.flags = 0;
|
||||
|
||||
cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
|
||||
cpufreq_freq_transition_begin(policy, &freqs);
|
||||
set_cpus_allowed_ptr(current, &cpus_allowed);
|
||||
clk_set_rate(cpuclk, freq);
|
||||
cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
|
||||
cpufreq_freq_transition_end(policy, &freqs, 0);
|
||||
|
||||
dev_dbg(dev, "set frequency %lu Hz\n", freq);
|
||||
|
||||
|
Reference in New Issue
Block a user