]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
PM: wakeup: Show statistics for deleted wakeup sources again
authorzhuguangqing <zhuguangqing@xiaomi.com>
Mon, 9 Dec 2019 09:35:23 +0000 (17:35 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
BugLink: https://bugs.launchpad.net/bugs/1890343
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.

Signed-off-by: zhuguangqing <zhuguangqing@xiaomi.com>
[ rjw: Subject & changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/base/power/wakeup.c

index 0bd9b291bb29a91284fa3efe5bf6b9c05a49d80c..92f0960e9014568dbdbf38f798874c10a764c1f6 100644 (file)
@@ -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;
 }