Skip to contentSkip to conversation

PM: wakeup: Show statistics for deleted wakeup sources again

PATCH New Florian Fainelli 1 participant 1 message Jun 2, 2020 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PM: wakeup: Show statistics for deleted wakeup sources again

From: zhuguangqing <[email protected]>

commit e976eb4b91e906f20ec25b20c152d53c472fc3fd upstream

After commit 00ee22c28915 (PM / wakeup: Use seq_open() to show wakeup stats), print_wakeup_source_stats(m, &deleted_ws) is not called from wakeup_sources_stats_seq_show() any more.

Because deleted_ws is one of the wakeup sources, it should be shown too, so add it to the end of all other wakeup sources.

---
 drivers/base/power/wakeup.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/base/power/wakeup.c +3 -0
index 0bd9b291bb29..92f0960e9014 100644
@@ -1073,6 +1073,9 @@ static void *wakeup_sources_stats_seq_next(struct seq_file *m,
 		break;
 	}
 
+	if (!next_ws)
+		print_wakeup_source_stats(m, &deleted_ws);
+
 	return next_ws;
 }
 
Signature · 1 line
2.17.1