diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-04-10 06:01:59 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-04-10 06:01:59 -0400 |
commit | be770021011f00bd6220c87876292053221ca5f1 (patch) | |
tree | 004a568289a595082119064edf07503170153c19 /kernel/power | |
parent | e5e02de0665ef2477e7a018193051387c6fe0fbc (diff) | |
parent | f321c9cbf3bbf86f6e6153419eaf93ad085e3d74 (diff) |
Merge back earlier suspend/hibernate material for v4.1.
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/main.c | 2 | ||||
-rw-r--r-- | kernel/power/suspend.c | 13 |
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 @@ | |||
11 | #include <linux/export.h> | 11 | #include <linux/export.h> |
12 | #include <linux/kobject.h> | 12 | #include <linux/kobject.h> |
13 | #include <linux/string.h> | 13 | #include <linux/string.h> |
14 | #include <linux/resume-trace.h> | 14 | #include <linux/pm-trace.h> |
15 | #include <linux/workqueue.h> | 15 | #include <linux/workqueue.h> |
16 | #include <linux/debugfs.h> | 16 | #include <linux/debugfs.h> |
17 | #include <linux/seq_file.h> | 17 | #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 @@ | |||
28 | #include <linux/ftrace.h> | 28 | #include <linux/ftrace.h> |
29 | #include <trace/events/power.h> | 29 | #include <trace/events/power.h> |
30 | #include <linux/compiler.h> | 30 | #include <linux/compiler.h> |
31 | #include <linux/moduleparam.h> | ||
31 | 32 | ||
32 | #include "power.h" | 33 | #include "power.h" |
33 | 34 | ||
@@ -233,12 +234,20 @@ static bool platform_suspend_again(suspend_state_t state) | |||
233 | suspend_ops->suspend_again() : false; | 234 | suspend_ops->suspend_again() : false; |
234 | } | 235 | } |
235 | 236 | ||
237 | #ifdef CONFIG_PM_DEBUG | ||
238 | static unsigned int pm_test_delay = 5; | ||
239 | module_param(pm_test_delay, uint, 0644); | ||
240 | MODULE_PARM_DESC(pm_test_delay, | ||
241 | "Number of seconds to wait before resuming from suspend test"); | ||
242 | #endif | ||
243 | |||
236 | static int suspend_test(int level) | 244 | static int suspend_test(int level) |
237 | { | 245 | { |
238 | #ifdef CONFIG_PM_DEBUG | 246 | #ifdef CONFIG_PM_DEBUG |
239 | if (pm_test_level == level) { | 247 | if (pm_test_level == level) { |
240 | printk(KERN_INFO "suspend debug: Waiting for 5 seconds.\n"); | 248 | printk(KERN_INFO "suspend debug: Waiting for %d second(s).\n", |
241 | mdelay(5000); | 249 | pm_test_delay); |
250 | mdelay(pm_test_delay * 1000); | ||
242 | return 1; | 251 | return 1; |
243 | } | 252 | } |
244 | #endif /* !CONFIG_PM_DEBUG */ | 253 | #endif /* !CONFIG_PM_DEBUG */ |