PM / wakeirq: Fixup SRCU conversion

Commit <5480437f7963999>("PM / wakeirq: Convert to SRCU") changes the
locking infrastructure for wakeup from RCU to SRCU. Fix up missed
location which still uses RCU instead of SRCU.

Change-Id: Ic6b65632ce588bdf56d032a0b62d7143f4bc5f36
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
This commit is contained in:
Kyle Yan 2017-08-28 14:44:42 -07:00 committed by Gerrit - the friendly Code Review server
parent 2e6001c553
commit 2791df88f6

View File

@ -814,8 +814,9 @@ void pm_get_active_wakeup_sources(char *pending_wakeup_source, size_t max)
struct wakeup_source *ws, *last_active_ws = NULL;
int len = 0;
bool active = false;
int srcuidx;
rcu_read_lock();
srcuidx = srcu_read_lock(&wakeup_srcu);
list_for_each_entry_rcu(ws, &wakeup_sources, entry) {
if (ws->active && len < max) {
if (!active)
@ -836,7 +837,7 @@ void pm_get_active_wakeup_sources(char *pending_wakeup_source, size_t max)
"Last active Wakeup Source: %s",
last_active_ws->name);
}
rcu_read_unlock();
srcu_read_unlock(&wakeup_srcu, srcuidx);
}
EXPORT_SYMBOL_GPL(pm_get_active_wakeup_sources);