• V
    cpufreq: Return 0 from ->fast_switch() on errors · 209887e6
    Viresh Kumar 提交于
    CPUFREQ_ENTRY_INVALID is a special symbol which is used to specify that
    an entry in the cpufreq table is invalid. But using it outside of the
    scope of the cpufreq table looks a bit incorrect.
    
    We can represent an invalid frequency by writing it as 0 instead if we
    need. Note that it is already done that way for the return value of the
    ->get() callback.
    
    Lets do the same for ->fast_switch() and not use CPUFREQ_ENTRY_INVALID
    outside of the scope of cpufreq table.
    
    Also update the comment over cpufreq_driver_fast_switch() to clearly
    mention what this returns.
    
    None of the drivers return CPUFREQ_ENTRY_INVALID as of now from
    ->fast_switch() callback and so we don't need to update any of those.
    Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
    209887e6
cpufreq.c 65.8 KB