[PATCH] kernel/power/swsusp.c

Erik Rigtorp
2004-07-03T17:42:32Z

Swsusp allocates a vt before it nows if it will need it. This interferes
with bootsplash. Here is a patch that moves the pm_prepare_console() call
so that its only executed if swsusp finds a valid image to resume.

diff -Nru linux-2.6.7/kernel/power/swsusp.c linux-2.6.7-swsusp/kernel/power/swsusp.c
--- linux-2.6.7/kernel/power/swsusp.c 2004-06-16 07:19:02.000000000 +0200
+++ linux-2.6.7-swsusp/kernel/power/swsusp.c 2004-07-03 19:01:28.000000000 +0200
@@ -1067,6 +1069,9 @@
printk( "%sSignature found, resuming\n", name_resume );
MDELAY(1000);

+ if (pm_prepare_console())
+ printk("swsusp: Can't allocate a console... proceeding\n");
+
if (bdev_read_page(bdev, next.val, cur)) return -EIO;
if (sanity_check(&cur->sh)) /* Is this same machine? */
return -EPERM;
@@ -1190,9 +1195,6 @@
}
MDELAY(1000);

- if (pm_prepare_console())
- printk("swsusp: Can't allocate a console... proceeding\n");
-
if (!resume_file[0] && resume_status == RESUME_SPECIFIED) {
printk( "suspension device unspecified\n" );
return -EINVAL;
@@ -1206,7 +1208,6 @@
panic("This never returns");

read_failure:
- pm_restore_console();
return 0;
}