aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/disk.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2005-07-07 17:56:43 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 18:23:43 -0700
commit3efa147ad7608196639882ba4075b376f306fe16 (patch)
treeedc1176c8af4ce97c3586382ebb7de68936f1bec /kernel/power/disk.c
parente00d9967e3addea86dded46deefc5daec5d52e5a (diff)
downloadkernel_samsung_espresso10-3efa147ad7608196639882ba4075b376f306fe16.zip
kernel_samsung_espresso10-3efa147ad7608196639882ba4075b376f306fe16.tar.gz
kernel_samsung_espresso10-3efa147ad7608196639882ba4075b376f306fe16.tar.bz2
[PATCH] pm: Fix resume from initrd
Move device name resolution code around so that it is not called from resume-from-initrd. name_to_dev_t may be unavailable at that point. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r--kernel/power/disk.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index fb8de63..c51a4d9 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -234,6 +234,16 @@ static int software_resume(void)
{
int error;
+ if (!swsusp_resume_device) {
+ if (!strlen(resume_file))
+ return -ENOENT;
+ swsusp_resume_device = name_to_dev_t(resume_file);
+ pr_debug("swsusp: Resume From Partition %s\n", resume_file);
+ } else {
+ pr_debug("swsusp: Resume From Partition %d:%d\n",
+ MAJOR(swsusp_resume_device), MINOR(swsusp_resume_device));
+ }
+
if (noresume) {
/**
* FIXME: If noresume is specified, we need to find the partition