diff options
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/hibernate.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index 0f8785080cde..50f537953e70 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c | |||
@@ -33,6 +33,7 @@ | |||
33 | static int nocompress = 0; | 33 | static int nocompress = 0; |
34 | static int noresume = 0; | 34 | static int noresume = 0; |
35 | static int resume_wait = 0; | 35 | static int resume_wait = 0; |
36 | static int resume_delay = 0; | ||
36 | static char resume_file[256] = CONFIG_PM_STD_PARTITION; | 37 | static char resume_file[256] = CONFIG_PM_STD_PARTITION; |
37 | dev_t swsusp_resume_device; | 38 | dev_t swsusp_resume_device; |
38 | sector_t swsusp_resume_block; | 39 | sector_t swsusp_resume_block; |
@@ -730,6 +731,12 @@ static int software_resume(void) | |||
730 | 731 | ||
731 | pr_debug("PM: Checking hibernation image partition %s\n", resume_file); | 732 | pr_debug("PM: Checking hibernation image partition %s\n", resume_file); |
732 | 733 | ||
734 | if (resume_delay) { | ||
735 | printk(KERN_INFO "Waiting %dsec before reading resume device...\n", | ||
736 | resume_delay); | ||
737 | ssleep(resume_delay); | ||
738 | } | ||
739 | |||
733 | /* Check if the device is there */ | 740 | /* Check if the device is there */ |
734 | swsusp_resume_device = name_to_dev_t(resume_file); | 741 | swsusp_resume_device = name_to_dev_t(resume_file); |
735 | if (!swsusp_resume_device) { | 742 | if (!swsusp_resume_device) { |
@@ -1079,8 +1086,15 @@ static int __init resumewait_setup(char *str) | |||
1079 | return 1; | 1086 | return 1; |
1080 | } | 1087 | } |
1081 | 1088 | ||
1089 | static int __init resumedelay_setup(char *str) | ||
1090 | { | ||
1091 | resume_delay = simple_strtoul(str, NULL, 0); | ||
1092 | return 1; | ||
1093 | } | ||
1094 | |||
1082 | __setup("noresume", noresume_setup); | 1095 | __setup("noresume", noresume_setup); |
1083 | __setup("resume_offset=", resume_offset_setup); | 1096 | __setup("resume_offset=", resume_offset_setup); |
1084 | __setup("resume=", resume_setup); | 1097 | __setup("resume=", resume_setup); |
1085 | __setup("hibernate=", hibernate_setup); | 1098 | __setup("hibernate=", hibernate_setup); |
1086 | __setup("resumewait", resumewait_setup); | 1099 | __setup("resumewait", resumewait_setup); |
1100 | __setup("resumedelay=", resumedelay_setup); | ||