PM / OPP: Add opp_rcu_lockdep_assert() to _find_device_opp()
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 5 Nov 2015 08:51:21 +0000 (14:21 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 6 Nov 2015 22:59:42 +0000 (23:59 +0100)
commit0597e818501f595090a49a1779ab6ec377051b11
treec533619d73d101302533e476b51dd8935385d820
parent4a3a1353a84796f93d389694e3b87ede533953fe
PM / OPP: Add opp_rcu_lockdep_assert() to _find_device_opp()

_find_device_opp() should be called with rcu-read lock or
dev_opp_list_lock held. Add the opp_rcu_lockdep_assert() check to make
sure caller have taken appropriate locks.

Fix comment over the routine as well.

Suggested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/opp/core.c