diff options
| author | Patrick Mochel <mochel@osdl.org> | 2003-08-12 20:55:13 -0700 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2003-08-12 20:55:13 -0700 |
| commit | 05f11b379c8af946cfc48b8f4823e285fb926df7 (patch) | |
| tree | 4cd49bb7746974b48eb79aceb75bf3fb315bd50e /include/linux | |
| parent | 5e29fc2e90e6389f9cc3f8f8df6c54cb09eb5d47 (diff) | |
[swsusp] Remove two panic()s.
- Make software_suspend() return an int, so caller can tell what happened.
- Do check for HIGHMEM and DISCONTIGMEM early in software_suspend() and
fail gracefully, instead of checking far down the call chain and having
to call panic().
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/suspend.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index af0143331c94..6fe7aeec7249 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -50,7 +50,7 @@ extern int shrink_mem(void); extern void drain_local_pages(void); /* kernel/suspend.c */ -extern void software_suspend(void); +extern int software_suspend(void); extern void software_resume(void); extern int register_suspend_notifier(struct notifier_block *); @@ -72,8 +72,9 @@ extern void do_suspend_lowlevel(int resume); extern void do_suspend_lowlevel_s4bios(int resume); #else /* CONFIG_SOFTWARE_SUSPEND */ -static inline void software_suspend(void) +static inline int software_suspend(void) { + return -EPERM; } #define software_resume() do { } while(0) #define register_suspend_notifier(a) do { } while(0) |
