diff options
| author | Patrick Mochel <mochel@osdl.org> | 2003-08-12 21:59:26 -0700 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2003-08-12 21:59:26 -0700 |
| commit | f2df1a5f499f8d559f66900b0e3b3fbf52f88d49 (patch) | |
| tree | 3f745d68837a2fd6c7e9bb6accbf1cb4e1c09c80 /include | |
| parent | 05f11b379c8af946cfc48b8f4823e285fb926df7 (diff) | |
[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 <part>' to
their init scripts to reset the partition to swap use. IMO, this is better
anyway.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/suspend.h | 5 |
1 files changed, 0 insertions, 5 deletions
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 */ |
