Skip to content
  • Rafael J. Wysocki's avatar
    cpufreq: Drop cpufreq_policy_restore() · 11ce707e
    Rafael J. Wysocki authored
    
    
    Notice that when cpufreq_policy_restore() is called, its per-CPU
    cpufreq_cpu_data variable has been already dereferenced and if that
    variable is not NULL, the policy local pointer in cpufreq_add_dev()
    contains its value.
    
    Therefore it is not necessary to dereference it again and the
    policy pointer can be used directly.  Moreover, if that pointer
    is not NULL, the policy is inactive (or the previous check would
    have made us return from cpufreq_add_dev()) so the restoration
    code from cpufreq_policy_restore() can be moved to that point
    in cpufreq_add_dev().
    
    Do that and drop cpufreq_policy_restore().
    
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    11ce707e