aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-07-02 12:26:23 -0700
committerH. Peter Anvin <hpa@zytor.com>2006-07-02 12:26:23 -0700
commit7a954d574303481190b6e377607851ff31c6c2c9 (patch)
tree4de7a3651e2a14a200ab425b0e3360440d5d0643
parent154c0ca675048a41a3f2ca5d3c0800b07bbc1d77 (diff)
downloadlinux-2.6-klibc-clean-7a954d574303481190b6e377607851ff31c6c2c9.tar.gz
[klibc] Remove in-kernel resume-from-disk invocation code
This removes the part of resume from disk that have been replaced by functionality in kinit. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--kernel/power/disk.c45
1 files changed, 4 insertions, 41 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index e13e740678456c..a8115c3ea61518 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -22,8 +22,6 @@
#include "power.h"
-static int noresume = 0;
-char resume_file[256] = CONFIG_PM_STD_PARTITION;
dev_t swsusp_resume_device;
/**
@@ -166,26 +164,13 @@ static int software_resume(void)
down(&pm_sem);
if (!swsusp_resume_device) {
- if (!strlen(resume_file)) {
- up(&pm_sem);
- 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
- * and reset it back to normal swap space.
- */
- up(&pm_sem);
+ pr_debug("swsusp: No device given!\n");
return 0;
}
+ pr_debug("swsusp: Resume From Partition %d:%d\n",
+ MAJOR(swsusp_resume_device), MINOR(swsusp_resume_device));
+
pr_debug("PM: Checking swsusp image.\n");
if ((error = swsusp_check()))
@@ -228,8 +213,6 @@ static int software_resume(void)
return 0;
}
-late_initcall(software_resume);
-
static const char * const pm_disk_modes[] = {
[PM_DISK_FIRMWARE] = "firmware",
@@ -333,7 +316,6 @@ static ssize_t resume_store(struct subsystem *subsys, const char *buf, size_t n)
swsusp_resume_device = res;
up(&pm_sem);
printk("Attempting manual resume\n");
- noresume = 0;
software_resume();
ret = n;
out:
@@ -380,22 +362,3 @@ static int __init pm_disk_init(void)
}
core_initcall(pm_disk_init);
-
-
-static int __init resume_setup(char *str)
-{
- if (noresume)
- return 1;
-
- strncpy( resume_file, str, 255 );
- return 1;
-}
-
-static int __init noresume_setup(char *str)
-{
- noresume = 1;
- return 1;
-}
-
-__setup("noresume", noresume_setup);
-__setup("resume=", resume_setup);