PM: sleep: stats: Log errors right after running suspend callbacks
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 29 Jan 2024 16:25:48 +0000 (17:25 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 5 Feb 2024 13:28:54 +0000 (14:28 +0100)
commitac6f87aaa26fa88680db23051a5d2b13a08d13b8
tree84abee80d8c19440457e08aefa8f32d28ecc40f3
parenta6d38e991dc4f1b4a86137177435660df53951c5
PM: sleep: stats: Log errors right after running suspend callbacks

The error logging and failure statistics updates are carried out in two
places in each system-wide device suspend phase, which is unnecessary
code duplication, so do that in one place in each phase, right after
invoking device suspend callbacks.

While at it, add "noirq" or "late" to the "async" string printed when
the failing device callback in the "noirq" or "late" suspend phase,
respectively, was run asynchronously.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/base/power/main.c