Skip to content

Commit 99917e3

Browse files
committed
Revert "drivers: base: power: wakeup.c: Use built-in RCU list checking"
This reverts commit 8ba8880 as a better version is already in Rafael's tree, sorry about that. Reported-by: "Rafael J. Wysocki" <[email protected]> Cc: Madhuparna Bhowmik <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 8ba8880 commit 99917e3

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

drivers/base/power/wakeup.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,7 @@ void device_wakeup_arm_wake_irqs(void)
405405
int srcuidx;
406406

407407
srcuidx = srcu_read_lock(&wakeup_srcu);
408-
list_for_each_entry_rcu(ws, &wakeup_sources, entry,
409-
srcu_read_lock_held(&wakeup_srcu))
408+
list_for_each_entry_rcu(ws, &wakeup_sources, entry)
410409
dev_pm_arm_wake_irq(ws->wakeirq);
411410
srcu_read_unlock(&wakeup_srcu, srcuidx);
412411
}
@@ -422,8 +421,7 @@ void device_wakeup_disarm_wake_irqs(void)
422421
int srcuidx;
423422

424423
srcuidx = srcu_read_lock(&wakeup_srcu);
425-
list_for_each_entry_rcu(ws, &wakeup_sources, entry,
426-
srcu_read_lock_held(&wakeup_srcu))
424+
list_for_each_entry_rcu(ws, &wakeup_sources, entry)
427425
dev_pm_disarm_wake_irq(ws->wakeirq);
428426
srcu_read_unlock(&wakeup_srcu, srcuidx);
429427
}
@@ -876,8 +874,7 @@ void pm_print_active_wakeup_sources(void)
876874
struct wakeup_source *last_activity_ws = NULL;
877875

878876
srcuidx = srcu_read_lock(&wakeup_srcu);
879-
list_for_each_entry_rcu(ws, &wakeup_sources, entry,
880-
srcu_read_lock_held(&wakeup_srcu)) {
877+
list_for_each_entry_rcu(ws, &wakeup_sources, entry) {
881878
if (ws->active) {
882879
pm_pr_dbg("active wakeup source: %s\n", ws->name);
883880
active = 1;
@@ -1028,8 +1025,7 @@ void pm_wakep_autosleep_enabled(bool set)
10281025
int srcuidx;
10291026

10301027
srcuidx = srcu_read_lock(&wakeup_srcu);
1031-
list_for_each_entry_rcu(ws, &wakeup_sources, entry,
1032-
srcu_read_lock_held(&wakeup_srcu)) {
1028+
list_for_each_entry_rcu(ws, &wakeup_sources, entry) {
10331029
spin_lock_irq(&ws->lock);
10341030
if (ws->autosleep_enabled != set) {
10351031
ws->autosleep_enabled = set;
@@ -1108,8 +1104,7 @@ static void *wakeup_sources_stats_seq_start(struct seq_file *m,
11081104
}
11091105

11101106
*srcuidx = srcu_read_lock(&wakeup_srcu);
1111-
list_for_each_entry_rcu(ws, &wakeup_sources, entry,
1112-
srcu_read_lock_held(&wakeup_srcu)) {
1107+
list_for_each_entry_rcu(ws, &wakeup_sources, entry) {
11131108
if (n-- <= 0)
11141109
return ws;
11151110
}

0 commit comments

Comments
 (0)