]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: remove policy from cpufreq_policy_list during suspend
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 20 Aug 2013 06:38:23 +0000 (12:08 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 20 Aug 2013 13:43:50 +0000 (15:43 +0200)
commit0d0991abc34501ec31da6af04a336a0515823299
treee36e7c5c978e7a84c7af393340ba28d55296a9dc
parent0458d268bf7268dc9b18c5082bb9050b469d3f8e
cpufreq: remove policy from cpufreq_policy_list during suspend

cpufreq_policy_list is a list of active policies.  We do remove
policies from this list when all CPUs belonging to that policy are
removed.  But during system suspend we don't really free a policy
struct as it will be used again during resume, so we didn't remove
it from cpufreq_policy_list as well..

However, this is incorrect.  We are saying this policy isn't valid
anymore and must not be referenced (though we haven't freed it), but
it can still be used by code that iterates over cpufreq_policy_list.

Remove policy from this list during system suspend as well.
Of course, we must add it back whenever the first CPU belonging to
that policy shows up.

[rjw: Changelog]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c