summaryrefslogtreecommitdiffstats
path: root/kernel/power/suspend.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-20 03:38:07 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-22 02:33:03 +0200
commit8915aa2042f85ecf86d4a202ef6d04bf06f05cca (patch)
tree85458428f75e7cdbcf0271614a0aec29ed3fd850 /kernel/power/suspend.c
parentPM / sleep: Do not print debug messages by default (diff)
downloadlinux-8915aa2042f85ecf86d4a202ef6d04bf06f05cca.tar.xz
linux-8915aa2042f85ecf86d4a202ef6d04bf06f05cca.zip
PM / sleep: Mark suspend/hibernation start and finish
Regardless of whether or not debug messages from the core system suspend/hibernation code are enabled, it is useful to know when system-wide transitions start and finish (or fail), so print "info" messages at these points. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Mark Salyzyn <salyzyn@android.com>
Diffstat (limited to 'kernel/power/suspend.c')
-rw-r--r--kernel/power/suspend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 4f10773322fa..18cdb1596d27 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -584,6 +584,7 @@ int pm_suspend(suspend_state_t state)
if (state <= PM_SUSPEND_ON || state >= PM_SUSPEND_MAX)
return -EINVAL;
+ pr_info("PM: suspend entry (%s)\n", pm_states[state]);
error = enter_state(state);
if (error) {
suspend_stats.fail++;
@@ -591,6 +592,7 @@ int pm_suspend(suspend_state_t state)
} else {
suspend_stats.success++;
}
+ pr_info("PM: suspend exit\n");
return error;
}
EXPORT_SYMBOL(pm_suspend);