On 27-07-15, 16:03, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <[email protected]>
> 
> 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 <[email protected]>
> ---
>  drivers/cpufreq/cpufreq.c |   44 +++++++++++---------------------------------
>  1 file changed, 11 insertions(+), 33 deletions(-)

Acked-by: Viresh Kumar <[email protected]>

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to