diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2014-03-10 05:23:33 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-03-11 20:06:00 -0400 |
commit | e0b3165ba521c6824b3e9f563f38a701dfa2d8e6 (patch) | |
tree | c933f6ecc241a38c2e56f1b166c8c66d1635540c /drivers/cpufreq/cpufreq.c | |
parent | e837f9b58b83a705c9c14b26c3ee29fd9870322e (diff) |
cpufreq: add 'freq_table' in struct cpufreq_policy
freq table is not per CPU but per policy, so it makes more sense to
keep it within struct cpufreq_policy instead of a per-cpu variable.
This patch does it. Over that, there is no need to set policy->freq_table
to NULL in ->exit(), as policy structure is going to be freed soon.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 746f70875078..dddbefb857c9 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -191,6 +191,12 @@ unsigned int cpufreq_generic_get(unsigned int cpu) | |||
191 | } | 191 | } |
192 | EXPORT_SYMBOL_GPL(cpufreq_generic_get); | 192 | EXPORT_SYMBOL_GPL(cpufreq_generic_get); |
193 | 193 | ||
194 | /* Only for cpufreq core internal use */ | ||
195 | struct cpufreq_policy *cpufreq_cpu_get_raw(unsigned int cpu) | ||
196 | { | ||
197 | return per_cpu(cpufreq_cpu_data, cpu); | ||
198 | } | ||
199 | |||
194 | struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) | 200 | struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) |
195 | { | 201 | { |
196 | struct cpufreq_policy *policy = NULL; | 202 | struct cpufreq_policy *policy = NULL; |
@@ -1031,7 +1037,6 @@ static void update_policy_cpu(struct cpufreq_policy *policy, unsigned int cpu) | |||
1031 | 1037 | ||
1032 | up_write(&policy->rwsem); | 1038 | up_write(&policy->rwsem); |
1033 | 1039 | ||
1034 | cpufreq_frequency_table_update_policy_cpu(policy); | ||
1035 | blocking_notifier_call_chain(&cpufreq_policy_notifier_list, | 1040 | blocking_notifier_call_chain(&cpufreq_policy_notifier_list, |
1036 | CPUFREQ_UPDATE_POLICY_CPU, policy); | 1041 | CPUFREQ_UPDATE_POLICY_CPU, policy); |
1037 | } | 1042 | } |