aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2018-04-03 06:07:39 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-04-10 02:40:45 -0400
commit2dd0df8472ff9bb520673cb5862b08be9290c9fa (patch)
tree6026eab3515aa7cb2547d42a27937abcbbf61137
parentd983af9864b273e2fa19f564e6fa80d67638e539 (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.txt12
-rw-r--r--Documentation/cpu-freq/cpu-drivers.txt6
-rw-r--r--drivers/cpufreq/freq_table.c14
-rw-r--r--include/linux/cpufreq.h2
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==================================================================
98For details about OPP, see Documentation/power/opp.txt 98For details about OPP, see Documentation/power/opp.txt
99 99
100dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with 100dev_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
259particular order, but if they are cpufreq core will do DVFS a bit 259particular order, but if they are cpufreq core will do DVFS a bit
260quickly for them as search for best match is faster. 260quickly for them as search for best match is faster.
261 261
262By calling cpufreq_table_validate_and_show(), the cpuinfo.min_freq and 262The cpufreq table is verified automatically by the core if the policy contains a
263cpuinfo.max_freq values are detected, and policy->min and policy->max 263valid pointer in its policy->freq_table field.
264are set to the same values. This is helpful for the per-CPU
265initialization stage.
266 264
267cpufreq_frequency_table_verify() assures that at least one valid 265cpufreq_frequency_table_verify() assures that at least one valid
268frequency is within policy->min and policy->max, and all other criteria 266frequency 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
355int 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}
367EXPORT_SYMBOL_GPL(cpufreq_table_validate_and_show);
368
369int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy) 355int 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,
960extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; 960extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs;
961extern struct freq_attr cpufreq_freq_attr_scaling_boost_freqs; 961extern struct freq_attr cpufreq_freq_attr_scaling_boost_freqs;
962extern struct freq_attr *cpufreq_generic_attr[]; 962extern struct freq_attr *cpufreq_generic_attr[];
963int cpufreq_table_validate_and_show(struct cpufreq_policy *policy,
964 struct cpufreq_frequency_table *table);
965int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy); 963int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy);
966 964
967unsigned int cpufreq_generic_get(unsigned int cpu); 965unsigned int cpufreq_generic_get(unsigned int cpu);