cpufreq: imx6q: call CPUFREQ_POSTCHANGE notfier in error cases
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 19 Jun 2013 05:48:20 +0000 (11:18 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 24 Jun 2013 12:49:00 +0000 (18:19 +0530)
commit5a571c352db1eb0aa6325d71807bb40b972faa3b
treedca3248b7307c87f177ed69cd95ac0abb2a41856
parentc3aca6b1ce17a2e866788bc2bd40e25ef6e5ba58
cpufreq: imx6q: call CPUFREQ_POSTCHANGE notfier in error cases

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 moves PRECHANGE notifier down so that we call it just before starting
frequency transition.

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/imx6q-cpufreq.c