OSDN Git Service

cpufreq: Reorder and simplify cpufreq_update_policy()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 19 Feb 2019 23:24:25 +0000 (00:24 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 20 Feb 2019 09:18:37 +0000 (10:18 +0100)
commit348a2ec5f5a5af15509252dfc6a30fa190ac0203
tree7358c08bb8a4be1525335f165734baacbf917995
parenta0dbb819b84f87b3cb35083e264e9e584630e1f7
cpufreq: Reorder and simplify cpufreq_update_policy()

In cpufreq_update_policy(), instead of updating new_policy.cur
separately, which is kind of confusing, because cpufreq_set_policy()
doesn't take that value into account directly anyway, make the copy
of the existing policy after calling cpufreq_update_current_freq().

No intentional changes of behavior.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/cpufreq.c