cpufreq: omap: call CPUFREQ_POSTCHANGE notfier in error cases
commit44a49a23c97d9442f4eafe011913897c77bd3075
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 19 Jun 2013 05:48:20 +0000 (19 11:18 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 24 Jun 2013 12:49:00 +0000 (24 18:19 +0530)
tree1f46f9499b9a2b3b4189166242a81422e0dfc94f
parent5a571c352db1eb0aa6325d71807bb40b972faa3b
cpufreq: omap: 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.

Omap driver was taking care of it well, but wasn't restoring freqs.new to
freqs.old in some cases. I wasn't required to add code for it as moving
PRECHANGE notifier down was a better option, so that we call it just before
starting frequency transition.

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/omap-cpufreq.c