All pastes #162328 Raw Edit

Something

public text v1 · immutable
·published 2006-09-06 12:23 UTC
rendered paste body
 init/do_mounts.c    |    6 +++---
 init/main.c         |    2 ++
 kernel/power/disk.c |    5 +----
 3 files changed, 6 insertions(+), 7 deletions(-)
diff -ruNp 9951.patch-old/init/do_mounts.c 9951.patch-new/init/do_mounts.c
--- 9951.patch-old/init/do_mounts.c	2006-09-06 22:21:35.000000000 +1000
+++ 9951.patch-new/init/do_mounts.c	2006-09-06 22:17:36.000000000 +1000
@@ -426,12 +426,12 @@ void __init prepare_namespace(void)
 
 	/* Suspend2:
 	 * By this point, suspend_early_init has been called to initialise our
-	 * proc interface. If modules are built in, they have registered (all
-	 * of the above via late_initcalls).
+	 * sysfs interface. If modules are built in, they have registered (all
+	 * of the above via initcalls).
 	 * 
 	 * We have not yet looked to see if an image exists, however. If we
 	 * have an initrd, it is expected that the user will have set it up
-	 * to echo > /proc/suspend2/do_resume and thus initiate any
+	 * to echo > /sys/power/suspend2/do_resume and thus initiate any
 	 * resume. If they don't do that, we do it immediately after the initrd
 	 * is finished (major issues if they mount filesystems rw from the
 	 * initrd! - they are warned. If there's no usable initrd, we do our
diff -ruNp 9951.patch-old/init/main.c 9951.patch-new/init/main.c
--- 9951.patch-old/init/main.c	2006-09-06 22:21:35.000000000 +1000
+++ 9951.patch-new/init/main.c	2006-09-06 22:19:20.000000000 +1000
@@ -103,6 +103,7 @@ static inline void acpi_early_init(void)
 #ifndef CONFIG_DEBUG_RODATA
 static inline void mark_rodata_ro(void) { }
 #endif
+extern int software_resume(void);
 
 #ifdef CONFIG_TC
 extern void tc_init(void);
@@ -773,6 +774,7 @@ static int init(void * unused)
 	mark_rodata_ro();
 	system_state = SYSTEM_RUNNING;
 	numa_default_policy();
+	software_resume();
 
 	if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
 		printk(KERN_WARNING "Warning: unable to open an initial console.\n");
diff -ruNp 9951.patch-old/kernel/power/disk.c 9951.patch-new/kernel/power/disk.c
--- 9951.patch-old/kernel/power/disk.c	2006-09-06 22:21:35.000000000 +1000
+++ 9951.patch-new/kernel/power/disk.c	2006-09-06 22:19:27.000000000 +1000
@@ -171,7 +171,7 @@ int pm_suspend_disk(void)
  *
  */
 
-static int software_resume(void)
+int software_resume(void)
 {
 	int error;
 
@@ -249,9 +249,6 @@ static int software_resume(void)
 	return 0;
 }
 
-late_initcall(software_resume);
-
-
 static const char * const pm_disk_modes[] = {
 	[PM_DISK_FIRMWARE]	= "firmware",
 	[PM_DISK_PLATFORM]	= "platform",