]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: Clean up after a failing light-weight initialization
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 27 Dec 2013 00:07:11 +0000 (01:07 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 29 Dec 2013 14:30:36 +0000 (15:30 +0100)
commit64649c608ded4070f8b3eec5fc67154b3f2c3a2e
treecf521f1fb24d4a77c5b1dc9df0d896d9f0db9729
parent54a012636470edd6bb8fe47173b7556e7c673284
cpufreq: Clean up after a failing light-weight initialization

If cpufreq_policy_restore() returns NULL during system resume,
__cpufreq_add_dev() should just fall back to the full initialization
instead of returning an error, because that may actually make things
work.  Moreover, it should not leave stale fallback data behind after
it has failed to restore a previously existing policy.

This change is based on Viresh Kumar's work.

Fixes: 0ce3d9b7b97b ("cpufreq: Perform light-weight init/teardown during suspend/resume")
Reported-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: 3.12+ <stable@vger.kernel.org> # 3.12+
drivers/cpufreq/cpufreq.c