Skip to content

Commit

Permalink
cpufreq: arm-big-little: call CPUFREQ_POSTCHANGE notfier in error cases
Browse files Browse the repository at this point in the history
PRECHANGE and POSTCHANGE notifiers must be called in groups, i.e either both
should be called or both shouldn't be.

In case we have started PRECHANGE notifier and found an error, we must call
POSTCHANGE notifier with freqs.new = freqs.old to guarantee that sequence of
calling notifiers is complete.

This patch fixes it.

This also removes code setting policy->cur as this is also done by POSTCHANGE
notifier.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
  • Loading branch information
Viresh Kumar committed Jun 24, 2013
1 parent 9e895ac commit 3d69dd5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/cpufreq/arm_big_little.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,9 @@ static int bL_cpufreq_set_target(struct cpufreq_policy *policy,
ret = clk_set_rate(clk[cur_cluster], freqs.new * 1000);
if (ret) {
pr_err("clk_set_rate failed: %d\n", ret);
return ret;
freqs.new = freqs.old;
}

policy->cur = freqs.new;

cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);

return ret;
Expand Down

0 comments on commit 3d69dd5

Please sign in to comment.