From 2791df88f62c89b70e21101a5228aadce6528385 Mon Sep 17 00:00:00 2001 From: Kyle Yan Date: Mon, 28 Aug 2017 14:44:42 -0700 Subject: [PATCH] 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 --- drivers/base/power/wakeup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 194c073e6f91..50cb3da3a13c 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -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);