summaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-21 14:49:51 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-24 23:57:46 +0200
commitbebcdae3ec13b2171ff91594787ab37b3fdb3306 (patch)
tree4739f619ba52c71e2c84cc5d980b7949c7322e20 /kernel/power
parente516a1db43cea397cf63d395534236d9869f0310 (diff)
PM / suspend: Use mem_sleep_labels[] strings in messages
Some messages in suspend.c currently print state names from pm_states[], but that may be confusing if the mem_sleep sysfs attribute is changed to anything different from "mem", because in those cases the messages will say either "freeze" or "standby" after writing "mem" to /sys/power/state. To avoid the confusion, use mem_sleep_labels[] strings in those messages instead. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/suspend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 5cf232795318..a3d270e2e313 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -560,7 +560,7 @@ static int enter_state(suspend_state_t state)
trace_suspend_resume(TPS("sync_filesystems"), 0, false);
#endif
- pm_pr_dbg("Preparing system for sleep (%s)\n", pm_states[state]);
+ pm_pr_dbg("Preparing system for sleep (%s)\n", mem_sleep_labels[state]);
pm_suspend_clear_flags();
error = suspend_prepare(state);
if (error)
@@ -570,7 +570,7 @@ static int enter_state(suspend_state_t state)
goto Finish;
trace_suspend_resume(TPS("suspend_enter"), state, false);
- pm_pr_dbg("Suspending system (%s)\n", pm_states[state]);
+ pm_pr_dbg("Suspending system (%s)\n", mem_sleep_labels[state]);
pm_restrict_gfp_mask();
error = suspend_devices_and_enter(state);
pm_restore_gfp_mask();
@@ -597,7 +597,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]);
+ pr_info("PM: suspend entry (%s)\n", mem_sleep_labels[state]);
error = enter_state(state);
if (error) {
suspend_stats.fail++;