aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpufreq.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-03-10 05:23:33 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-03-11 20:06:00 -0400
commite0b3165ba521c6824b3e9f563f38a701dfa2d8e6 (patch)
treec933f6ecc241a38c2e56f1b166c8c66d1635540c /include/linux/cpufreq.h
parente837f9b58b83a705c9c14b26c3ee29fd9870322e (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 'include/linux/cpufreq.h')
-rw-r--r--include/linux/cpufreq.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 325bab04271b..79341350f498 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -85,6 +85,7 @@ struct cpufreq_policy {
85 * called, but you're in IRQ context */ 85 * called, but you're in IRQ context */
86 86
87 struct cpufreq_real_policy user_policy; 87 struct cpufreq_real_policy user_policy;
88 struct cpufreq_frequency_table *freq_table;
88 89
89 struct list_head policy_list; 90 struct list_head policy_list;
90 struct kobject kobj; 91 struct kobject kobj;
@@ -474,7 +475,6 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
474int cpufreq_frequency_table_get_index(struct cpufreq_policy *policy, 475int cpufreq_frequency_table_get_index(struct cpufreq_policy *policy,
475 unsigned int freq); 476 unsigned int freq);
476 477
477void cpufreq_frequency_table_update_policy_cpu(struct cpufreq_policy *policy);
478ssize_t cpufreq_show_cpus(const struct cpumask *mask, char *buf); 478ssize_t cpufreq_show_cpus(const struct cpumask *mask, char *buf);
479 479
480#ifdef CONFIG_CPU_FREQ 480#ifdef CONFIG_CPU_FREQ
@@ -501,9 +501,6 @@ struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu);
501/* the following are really really optional */ 501/* the following are really really optional */
502extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; 502extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs;
503extern struct freq_attr *cpufreq_generic_attr[]; 503extern struct freq_attr *cpufreq_generic_attr[];
504void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table,
505 unsigned int cpu);
506void cpufreq_frequency_table_put_attr(unsigned int cpu);
507int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, 504int cpufreq_table_validate_and_show(struct cpufreq_policy *policy,
508 struct cpufreq_frequency_table *table); 505 struct cpufreq_frequency_table *table);
509 506
@@ -513,7 +510,6 @@ int cpufreq_generic_init(struct cpufreq_policy *policy,
513 unsigned int transition_latency); 510 unsigned int transition_latency);
514static inline int cpufreq_generic_exit(struct cpufreq_policy *policy) 511static inline int cpufreq_generic_exit(struct cpufreq_policy *policy)
515{ 512{
516 cpufreq_frequency_table_put_attr(policy->cpu);
517 return 0; 513 return 0;
518} 514}
519 515