From 988bed09d35a8533eb59868692b827dfae7b66fe Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Fri, 8 May 2015 11:53:45 +0530 Subject: [PATCH] cpufreq: Don't clear cpufreq_cpu_data and policy list for inactive policies Now that we can check policy->cpus to find if policy is active or not, we don't need to clean cpufreq_cpu_data and delete policy from the list on light weight tear down of policies (like in suspend). To make it consistent and clean, set cpufreq_cpu_data for all related CPUs when the policy is first created and clean it only while it is freed. Also update cpufreq_cpu_get_raw() to check if cpu is part of policy->cpus mask, so that we don't end up getting policies for offline CPUs. In order to make sure that no users of 'policy' are using an inactive policy, use cpufreq_cpu_get_raw() instead of directly accessing cpufreq_cpu_data. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- Reading git-format-patch failed