Skip to content
  • Viresh Kumar's avatar
    e77dcb0b
    opp: Don't create an OPP table from dev_pm_opp_get_opp_table() · e77dcb0b
    Viresh Kumar authored
    
    
    It has been found that some users (like cpufreq-dt and others on LKML)
    have abused the helper dev_pm_opp_get_opp_table() to create the OPP
    table instead of just finding it, which is the wrong thing to do. This
    routine was meant for OPP core's internal working and exposed the whole
    functionality by mistake.
    
    Change the scope of dev_pm_opp_get_opp_table() to only finding the
    table. The internal helpers _opp_get_opp_table*() are thus renamed to
    _add_opp_table*(), dev_pm_opp_get_opp_table_indexed() is removed (as we
    don't need the index field for finding the OPP table) and so the only
    user, genpd, is updated.
    
    Note that the prototype of _add_opp_table() was already left in opp.h by
    mistake when it was removed earlier and so we weren't required to add it
    now.
    
    Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    e77dcb0b
    opp: Don't create an OPP table from dev_pm_opp_get_opp_table()
    Viresh Kumar authored
    
    
    It has been found that some users (like cpufreq-dt and others on LKML)
    have abused the helper dev_pm_opp_get_opp_table() to create the OPP
    table instead of just finding it, which is the wrong thing to do. This
    routine was meant for OPP core's internal working and exposed the whole
    functionality by mistake.
    
    Change the scope of dev_pm_opp_get_opp_table() to only finding the
    table. The internal helpers _opp_get_opp_table*() are thus renamed to
    _add_opp_table*(), dev_pm_opp_get_opp_table_indexed() is removed (as we
    don't need the index field for finding the OPP table) and so the only
    user, genpd, is updated.
    
    Note that the prototype of _add_opp_table() was already left in opp.h by
    mistake when it was removed earlier and so we weren't required to add it
    now.
    
    Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Loading