summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-04-10 12:01:59 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-04-10 12:01:59 +0200
commitbe770021011f00bd6220c87876292053221ca5f1 (patch)
tree004a568289a595082119064edf07503170153c19 /kernel/power
parente5e02de0665ef2477e7a018193051387c6fe0fbc (diff)
parentf321c9cbf3bbf86f6e6153419eaf93ad085e3d74 (diff)
downloadlinux-be770021011f00bd6220c87876292053221ca5f1.tar.gz
linux-be770021011f00bd6220c87876292053221ca5f1.tar.bz2
linux-be770021011f00bd6220c87876292053221ca5f1.zip
Merge back earlier suspend/hibernate material for v4.1.
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/main.c2
-rw-r--r--kernel/power/suspend.c13
2 files changed, 12 insertions, 3 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 9a59d042ea84..86e8157a450f 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -11,7 +11,7 @@
#include <linux/export.h>
#include <linux/kobject.h>
#include <linux/string.h>
-#include <linux/resume-trace.h>
+#include <linux/pm-trace.h>
#include <linux/workqueue.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index b7d6b3a721b1..8d7a1ef72758 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -28,6 +28,7 @@
#include <linux/ftrace.h>
#include <trace/events/power.h>
#include <linux/compiler.h>
+#include <linux/moduleparam.h>
#include "power.h"
@@ -233,12 +234,20 @@ static bool platform_suspend_again(suspend_state_t state)
suspend_ops->suspend_again() : false;
}
+#ifdef CONFIG_PM_DEBUG
+static unsigned int pm_test_delay = 5;
+module_param(pm_test_delay, uint, 0644);
+MODULE_PARM_DESC(pm_test_delay,
+ "Number of seconds to wait before resuming from suspend test");
+#endif
+
static int suspend_test(int level)
{
#ifdef CONFIG_PM_DEBUG
if (pm_test_level == level) {
- printk(KERN_INFO "suspend debug: Waiting for 5 seconds.\n");
- mdelay(5000);
+ printk(KERN_INFO "suspend debug: Waiting for %d second(s).\n",
+ pm_test_delay);
+ mdelay(pm_test_delay * 1000);
return 1;
}
#endif /* !CONFIG_PM_DEBUG */