From f2df1a5f499f8d559f66900b0e3b3fbf52f88d49 Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Tue, 12 Aug 2003 21:59:26 -0700 Subject: [power] Various swsusp cleanups. - Move SMP check to software_suspend() (from software_resume()), so we will not even attempt to sleep with it enabled. - Make software_resume() a late initcall, removing the explicit call from prepare_namespace(). - Initialize software_suspend_enabled to 1, instead of doing it manually in software_resume(). - Don't explicitly initialzie resume_file. - Remove resume_status variable, as we can simply check for (non-) NULL resume_file string. - "noresume" setup function changed to simply zero first byte of resume_file string, simplifying logic. - Don't attempt to reset swap signature if noresume is specified. - Downstream function (bdev_write_page() wasn't implemented anyway, so we can just remove that also). If noresume is specified, there will still be a suspend image left on the swap partition. It may behoove us to never reset the swap signature, and always leave the image intact on the disk, since it is a valid snapshot that we can resume from at anytime. This unconditional behavior would force the user to add 'mkswap ' to their init scripts to reset the partition to swap use. IMO, this is better anyway. --- include/linux/suspend.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include/linux') diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 6fe7aeec7249..28788d8a65ff 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -11,9 +11,6 @@ extern unsigned char software_suspend_enabled; -#define NORESUME 1 -#define RESUME_SPECIFIED 2 - #ifdef CONFIG_SOFTWARE_SUSPEND /* page backup entry */ typedef struct pbe { @@ -51,7 +48,6 @@ extern void drain_local_pages(void); /* kernel/suspend.c */ extern int software_suspend(void); -extern void software_resume(void); extern int register_suspend_notifier(struct notifier_block *); extern int unregister_suspend_notifier(struct notifier_block *); @@ -76,7 +72,6 @@ static inline int software_suspend(void) { return -EPERM; } -#define software_resume() do { } while(0) #define register_suspend_notifier(a) do { } while(0) #define unregister_suspend_notifier(a) do { } while(0) #endif /* CONFIG_SOFTWARE_SUSPEND */ -- cgit v1.2.3