[PATCH] name_to_dev_t warning fix
[linux-2.6.git] / kernel / power / disk.c
index fb8de63..3ec789c 100644 (file)
@@ -16,6 +16,8 @@
 #include <linux/device.h>
 #include <linux/delay.h>
 #include <linux/fs.h>
+#include <linux/mount.h>
+
 #include "power.h"
 
 
@@ -234,6 +236,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