Skip to content
  • Viresh Kumar's avatar
    cpufreq: Add new helper cpufreq_table_validate_and_show() · 27047a60
    Viresh Kumar authored
    
    
    Almost every cpufreq driver is required to validate its frequency table with:
    cpufreq_frequency_table_cpuinfo() and then expose it to cpufreq core with:
    cpufreq_frequency_table_get_attr().
    
    This patch creates another helper routine cpufreq_table_validate_and_show() that
    will do both these steps in a single call and will return 0 for success, error
    otherwise.
    
    This also fixes potential bugs in cpufreq drivers where people have called
    cpufreq_frequency_table_get_attr() before calling
    cpufreq_frequency_table_cpuinfo(), as the later may fail.
    
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    27047a60