diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2018-04-03 06:07:39 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-04-10 02:40:45 -0400 |
commit | 2dd0df8472ff9bb520673cb5862b08be9290c9fa (patch) | |
tree | 6026eab3515aa7cb2547d42a27937abcbbf61137 | |
parent | d983af9864b273e2fa19f564e6fa80d67638e539 (diff) |
cpufreq: Drop cpufreq_table_validate_and_show()
This isn't used anymore. Remove the helper and update documentation
accordingly.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | Documentation/cpu-freq/core.txt | 12 | ||||
-rw-r--r-- | Documentation/cpu-freq/cpu-drivers.txt | 6 | ||||
-rw-r--r-- | drivers/cpufreq/freq_table.c | 14 | ||||
-rw-r--r-- | include/linux/cpufreq.h | 2 |
4 files changed, 7 insertions, 27 deletions
diff --git a/Documentation/cpu-freq/core.txt b/Documentation/cpu-freq/core.txt index 978463a7c81e..073f128af5a7 100644 --- a/Documentation/cpu-freq/core.txt +++ b/Documentation/cpu-freq/core.txt | |||
@@ -97,12 +97,10 @@ flags - flags of the cpufreq driver | |||
97 | ================================================================== | 97 | ================================================================== |
98 | For details about OPP, see Documentation/power/opp.txt | 98 | For details about OPP, see Documentation/power/opp.txt |
99 | 99 | ||
100 | dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with | 100 | dev_pm_opp_init_cpufreq_table - |
101 | cpufreq_table_validate_and_show() which is provided with the list of | 101 | This function provides a ready to use conversion routine to translate |
102 | frequencies that are available for operation. This function provides | 102 | the OPP layer's internal information about the available frequencies |
103 | a ready to use conversion routine to translate the OPP layer's internal | 103 | into a format readily providable to cpufreq. |
104 | information about the available frequencies into a format readily | ||
105 | providable to cpufreq. | ||
106 | 104 | ||
107 | WARNING: Do not use this function in interrupt context. | 105 | WARNING: Do not use this function in interrupt context. |
108 | 106 | ||
@@ -112,7 +110,7 @@ dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with | |||
112 | /* Do things */ | 110 | /* Do things */ |
113 | r = dev_pm_opp_init_cpufreq_table(dev, &freq_table); | 111 | r = dev_pm_opp_init_cpufreq_table(dev, &freq_table); |
114 | if (!r) | 112 | if (!r) |
115 | cpufreq_table_validate_and_show(policy, freq_table); | 113 | policy->freq_table = freq_table; |
116 | /* Do other things */ | 114 | /* Do other things */ |
117 | } | 115 | } |
118 | 116 | ||
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt index 61546ac578d6..6e353d00cdc6 100644 --- a/Documentation/cpu-freq/cpu-drivers.txt +++ b/Documentation/cpu-freq/cpu-drivers.txt | |||
@@ -259,10 +259,8 @@ CPUFREQ_ENTRY_INVALID. The entries don't need to be in sorted in any | |||
259 | particular order, but if they are cpufreq core will do DVFS a bit | 259 | particular order, but if they are cpufreq core will do DVFS a bit |
260 | quickly for them as search for best match is faster. | 260 | quickly for them as search for best match is faster. |
261 | 261 | ||
262 | By calling cpufreq_table_validate_and_show(), the cpuinfo.min_freq and | 262 | The cpufreq table is verified automatically by the core if the policy contains a |
263 | cpuinfo.max_freq values are detected, and policy->min and policy->max | 263 | valid pointer in its policy->freq_table field. |
264 | are set to the same values. This is helpful for the per-CPU | ||
265 | initialization stage. | ||
266 | 264 | ||
267 | cpufreq_frequency_table_verify() assures that at least one valid | 265 | cpufreq_frequency_table_verify() assures that at least one valid |
268 | frequency is within policy->min and policy->max, and all other criteria | 266 | frequency is within policy->min and policy->max, and all other criteria |
diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c index 10e119ae66dd..3a8cc99e6815 100644 --- a/drivers/cpufreq/freq_table.c +++ b/drivers/cpufreq/freq_table.c | |||
@@ -352,20 +352,6 @@ static int set_freq_table_sorted(struct cpufreq_policy *policy) | |||
352 | return 0; | 352 | return 0; |
353 | } | 353 | } |
354 | 354 | ||
355 | int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, | ||
356 | struct cpufreq_frequency_table *table) | ||
357 | { | ||
358 | int ret; | ||
359 | |||
360 | ret = cpufreq_frequency_table_cpuinfo(policy, table); | ||
361 | if (ret) | ||
362 | return ret; | ||
363 | |||
364 | policy->freq_table = table; | ||
365 | return 0; | ||
366 | } | ||
367 | EXPORT_SYMBOL_GPL(cpufreq_table_validate_and_show); | ||
368 | |||
369 | int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy) | 355 | int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy) |
370 | { | 356 | { |
371 | int ret; | 357 | int ret; |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 1fe49724da9e..87f48dd932eb 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -960,8 +960,6 @@ extern void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq, | |||
960 | extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; | 960 | extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; |
961 | extern struct freq_attr cpufreq_freq_attr_scaling_boost_freqs; | 961 | extern struct freq_attr cpufreq_freq_attr_scaling_boost_freqs; |
962 | extern struct freq_attr *cpufreq_generic_attr[]; | 962 | extern struct freq_attr *cpufreq_generic_attr[]; |
963 | int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, | ||
964 | struct cpufreq_frequency_table *table); | ||
965 | int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy); | 963 | int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy); |
966 | 964 | ||
967 | unsigned int cpufreq_generic_get(unsigned int cpu); | 965 | unsigned int cpufreq_generic_get(unsigned int cpu); |