cpufreq: Add cpufreq_cpu_acquire() and cpufreq_cpu_release()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 26 Mar 2019 11:16:58 +0000 (12:16 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 1 Apr 2019 21:43:05 +0000 (23:43 +0200)
commit540a375822a40675868c5f62ae57b608a579e56a
tree3bd9e9ee6d92331bb1d3dca78e087e343a1b3c03
parent5a25e3f7cc538fb49e11267c1e41c54ccf83835e
cpufreq: Add cpufreq_cpu_acquire() and cpufreq_cpu_release()

It sometimes is necessary to find a cpufreq policy for a given CPU
and acquire its rwsem (for writing) immediately after that, so
introduce cpufreq_cpu_acquire() as a helper for that and the
complementary cpufreq_cpu_release().

Make cpufreq_update_policy() use the new functions.

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