PM / OPP: take RCU lock in dev_pm_opp_get_opp_count
authorDmitry Torokhov <dtor@chromium.org>
Tue, 16 Dec 2014 23:09:38 +0000 (15:09 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 18 Dec 2014 00:42:49 +0000 (01:42 +0100)
commitb4718c02f49ab5e1452353f0fae78beabe81467c
tree7eb5b9f28f79d6cb0d43f5b6ea62d77eac6806a4
parent0fe30da2cb43782ee62d30c00a273d6934e5370e
PM / OPP: take RCU lock in dev_pm_opp_get_opp_count

A lot of callers are missing the fact that dev_pm_opp_get_opp_count
needs to be called under RCU lock. Given that RCU locks can safely be
nested, instead of providing *_locked() API, let's take RCU lock inside
dev_pm_opp_get_opp_count() and leave callers as is.

Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/opp.c