Skip to content

Commit 2dd0df8

Browse files
vireshkrafaeljw
authored andcommitted
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>
1 parent d983af9 commit 2dd0df8

4 files changed

Lines changed: 7 additions & 27 deletions

File tree

‎Documentation/cpu-freq/core.txt‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,10 @@ flags - flags of the cpufreq driver
9797
==================================================================
9898
For details about OPP, see Documentation/power/opp.txt
9999

100-
dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with
101-
cpufreq_table_validate_and_show() which is provided with the list of
102-
frequencies that are available for operation. This function provides
103-
a ready to use conversion routine to translate the OPP layer's internal
104-
information about the available frequencies into a format readily
105-
providable to cpufreq.
100+
dev_pm_opp_init_cpufreq_table -
101+
This function provides a ready to use conversion routine to translate
102+
the OPP layer's internal information about the available frequencies
103+
into a format readily providable to cpufreq.
106104

107105
WARNING: Do not use this function in interrupt context.
108106

@@ -112,7 +110,7 @@ dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with
112110
/* Do things */
113111
r = dev_pm_opp_init_cpufreq_table(dev, &freq_table);
114112
if (!r)
115-
cpufreq_table_validate_and_show(policy, freq_table);
113+
policy->freq_table = freq_table;
116114
/* Do other things */
117115
}
118116

‎Documentation/cpu-freq/cpu-drivers.txt‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,8 @@ CPUFREQ_ENTRY_INVALID. The entries don't need to be in sorted in any
259259
particular order, but if they are cpufreq core will do DVFS a bit
260260
quickly for them as search for best match is faster.
261261

262-
By calling cpufreq_table_validate_and_show(), the cpuinfo.min_freq and
263-
cpuinfo.max_freq values are detected, and policy->min and policy->max
264-
are set to the same values. This is helpful for the per-CPU
265-
initialization stage.
262+
The cpufreq table is verified automatically by the core if the policy contains a
263+
valid pointer in its policy->freq_table field.
266264

267265
cpufreq_frequency_table_verify() assures that at least one valid
268266
frequency is within policy->min and policy->max, and all other criteria

‎drivers/cpufreq/freq_table.c‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -352,20 +352,6 @@ static int set_freq_table_sorted(struct cpufreq_policy *policy)
352352
return 0;
353353
}
354354

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-
369355
int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy)
370356
{
371357
int ret;

‎include/linux/cpufreq.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,8 +960,6 @@ extern void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq,
960960
extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs;
961961
extern struct freq_attr cpufreq_freq_attr_scaling_boost_freqs;
962962
extern struct freq_attr *cpufreq_generic_attr[];
963-
int cpufreq_table_validate_and_show(struct cpufreq_policy *policy,
964-
struct cpufreq_frequency_table *table);
965963
int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy);
966964

967965
unsigned int cpufreq_generic_get(unsigned int cpu);

0 commit comments

Comments
 (0)