aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpufreq/freq_table.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c
index b9336edb9bd6..3458d27f63b4 100644
--- a/drivers/cpufreq/freq_table.c
+++ b/drivers/cpufreq/freq_table.c
@@ -86,6 +86,20 @@ int cpufreq_frequency_table_verify(struct cpufreq_policy *policy,
86} 86}
87EXPORT_SYMBOL_GPL(cpufreq_frequency_table_verify); 87EXPORT_SYMBOL_GPL(cpufreq_frequency_table_verify);
88 88
89/*
90 * Generic routine to verify policy & frequency table, requires driver to call
91 * cpufreq_frequency_table_get_attr() prior to it.
92 */
93int cpufreq_generic_frequency_table_verify(struct cpufreq_policy *policy)
94{
95 struct cpufreq_frequency_table *table =
96 cpufreq_frequency_get_table(policy->cpu);
97 if (!table)
98 return -ENODEV;
99
100 return cpufreq_frequency_table_verify(policy, table);
101}
102EXPORT_SYMBOL_GPL(cpufreq_generic_frequency_table_verify);
89 103
90int cpufreq_frequency_table_target(struct cpufreq_policy *policy, 104int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
91 struct cpufreq_frequency_table *table, 105 struct cpufreq_frequency_table *table,
@@ -199,6 +213,12 @@ struct freq_attr cpufreq_freq_attr_scaling_available_freqs = {
199}; 213};
200EXPORT_SYMBOL_GPL(cpufreq_freq_attr_scaling_available_freqs); 214EXPORT_SYMBOL_GPL(cpufreq_freq_attr_scaling_available_freqs);
201 215
216struct freq_attr *cpufreq_generic_attr[] = {
217 &cpufreq_freq_attr_scaling_available_freqs,
218 NULL,
219};
220EXPORT_SYMBOL_GPL(cpufreq_generic_attr);
221
202/* 222/*
203 * if you use these, you must assure that the frequency table is valid 223 * if you use these, you must assure that the frequency table is valid
204 * all the time between get_attr and put_attr! 224 * all the time between get_attr and put_attr!