• V
    cpufreq: remove policy from cpufreq_policy_list during suspend · 9515f4d6
    Viresh Kumar 提交于
    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: NViresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
    9515f4d6
cpufreq.c 54.5 KB