Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Viresh Kumar and committed by
Rafael J. Wysocki
2dd0df84 d983af98

+7 -27
+5 -7
Documentation/cpu-freq/core.txt
··· 97 97 ================================================================== 98 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 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. 106 104 107 105 WARNING: Do not use this function in interrupt context. 108 106 ··· 110 112 /* Do things */ 111 113 r = dev_pm_opp_init_cpufreq_table(dev, &freq_table); 112 114 if (!r) 113 - cpufreq_table_validate_and_show(policy, freq_table); 115 + policy->freq_table = freq_table; 114 116 /* Do other things */ 115 117 } 116 118
+2 -4
Documentation/cpu-freq/cpu-drivers.txt
··· 259 259 particular order, but if they are cpufreq core will do DVFS a bit 260 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 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. 266 264 267 265 cpufreq_frequency_table_verify() assures that at least one valid 268 266 frequency is within policy->min and policy->max, and all other criteria
-14
drivers/cpufreq/freq_table.c
··· 352 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 355 int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy) 370 356 { 371 357 int ret;
-2
include/linux/cpufreq.h
··· 960 960 extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; 961 961 extern struct freq_attr cpufreq_freq_attr_scaling_boost_freqs; 962 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 963 int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy); 966 964 967 965 unsigned int cpufreq_generic_get(unsigned int cpu);