From 99917e37b9e78b96af304ddeb4f9b82a5948bbd9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 19 Mar 2020 10:20:27 +0100 Subject: Revert "drivers: base: power: wakeup.c: Use built-in RCU list checking" This reverts commit 8ba88804bb3b877c841bc1864a8605111580cd0b as a better version is already in Rafael's tree, sorry about that. Reported-by: "Rafael J. Wysocki" Cc: Madhuparna Bhowmik Signed-off-by: Greg Kroah-Hartman --- drivers/base/power/wakeup.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'drivers/base') diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index d9fefc65ac34..27f3e60608e5 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -405,8 +405,7 @@ void device_wakeup_arm_wake_irqs(void) int srcuidx; srcuidx = srcu_read_lock(&wakeup_srcu); - list_for_each_entry_rcu(ws, &wakeup_sources, entry, - srcu_read_lock_held(&wakeup_srcu)) + list_for_each_entry_rcu(ws, &wakeup_sources, entry) dev_pm_arm_wake_irq(ws->wakeirq); srcu_read_unlock(&wakeup_srcu, srcuidx); } @@ -422,8 +421,7 @@ void device_wakeup_disarm_wake_irqs(void) int srcuidx; srcuidx = srcu_read_lock(&wakeup_srcu); - list_for_each_entry_rcu(ws, &wakeup_sources, entry, - srcu_read_lock_held(&wakeup_srcu)) + list_for_each_entry_rcu(ws, &wakeup_sources, entry) dev_pm_disarm_wake_irq(ws->wakeirq); srcu_read_unlock(&wakeup_srcu, srcuidx); } @@ -876,8 +874,7 @@ void pm_print_active_wakeup_sources(void) struct wakeup_source *last_activity_ws = NULL; srcuidx = srcu_read_lock(&wakeup_srcu); - list_for_each_entry_rcu(ws, &wakeup_sources, entry, - srcu_read_lock_held(&wakeup_srcu)) { + list_for_each_entry_rcu(ws, &wakeup_sources, entry) { if (ws->active) { pm_pr_dbg("active wakeup source: %s\n", ws->name); active = 1; @@ -1028,8 +1025,7 @@ void pm_wakep_autosleep_enabled(bool set) int srcuidx; srcuidx = srcu_read_lock(&wakeup_srcu); - list_for_each_entry_rcu(ws, &wakeup_sources, entry, - srcu_read_lock_held(&wakeup_srcu)) { + list_for_each_entry_rcu(ws, &wakeup_sources, entry) { spin_lock_irq(&ws->lock); if (ws->autosleep_enabled != set) { ws->autosleep_enabled = set; @@ -1108,8 +1104,7 @@ static void *wakeup_sources_stats_seq_start(struct seq_file *m, } *srcuidx = srcu_read_lock(&wakeup_srcu); - list_for_each_entry_rcu(ws, &wakeup_sources, entry, - srcu_read_lock_held(&wakeup_srcu)) { + list_for_each_entry_rcu(ws, &wakeup_sources, entry) { if (n-- <= 0) return ws; } -- cgit v1.2.3-70-g09d2