cpufreq: Drop cpufreq_policy_restore()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 Jul 2015 21:11:21 +0000 (23:11 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 28 Jul 2015 15:24:10 +0000 (17:24 +0200)
commit11ce707e6c2aea05e1f54680fb89a8a44ded5db4
treefa9f2761088f23d5e915b4713a28f62cd2cc7ec5
parent15c0b4d222f83672407419f9c9e167e996d8ad2b
cpufreq: Drop cpufreq_policy_restore()

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: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/cpufreq.c