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>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
e837f9b58b
commit
e0b3165ba5
@@ -85,6 +85,7 @@ struct cpufreq_policy {
|
||||
* called, but you're in IRQ context */
|
||||
|
||||
struct cpufreq_real_policy user_policy;
|
||||
struct cpufreq_frequency_table *freq_table;
|
||||
|
||||
struct list_head policy_list;
|
||||
struct kobject kobj;
|
||||
@@ -474,7 +475,6 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
|
||||
int cpufreq_frequency_table_get_index(struct cpufreq_policy *policy,
|
||||
unsigned int freq);
|
||||
|
||||
void cpufreq_frequency_table_update_policy_cpu(struct cpufreq_policy *policy);
|
||||
ssize_t cpufreq_show_cpus(const struct cpumask *mask, char *buf);
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ
|
||||
@@ -501,9 +501,6 @@ struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu);
|
||||
/* the following are really really optional */
|
||||
extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs;
|
||||
extern struct freq_attr *cpufreq_generic_attr[];
|
||||
void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table,
|
||||
unsigned int cpu);
|
||||
void cpufreq_frequency_table_put_attr(unsigned int cpu);
|
||||
int cpufreq_table_validate_and_show(struct cpufreq_policy *policy,
|
||||
struct cpufreq_frequency_table *table);
|
||||
|
||||
@@ -513,7 +510,6 @@ int cpufreq_generic_init(struct cpufreq_policy *policy,
|
||||
unsigned int transition_latency);
|
||||
static inline int cpufreq_generic_exit(struct cpufreq_policy *policy)
|
||||
{
|
||||
cpufreq_frequency_table_put_attr(policy->cpu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user