diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-10-18 03:04:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 14:37:18 -0700 |
commit | e6c5eb9541f2197a3ffab90b1c7a3250a9b51bf6 (patch) | |
tree | ac227415da22d4345f8e72a6a8e781757b6ce85a /include | |
parent | 26398a70ea35f153feb799fa850c71685667712b (diff) |
PM: Rework struct platform_suspend_ops
There is no reason why the .prepare() and .finish() methods in 'struct
platform_suspend_ops' should take any arguments, since architectures don't use
these methods' argument in any practically meaningful way (ie. either the
target system sleep state is conveyed to the platform by .set_target(), or
there is only one suspend state supported and it is indicated to the PM core
by .valid(), or .prepare() and .finish() aren't defined at all). There also
is no reason why .finish() should return any result.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/mpc52xx.h | 6 | ||||
-rw-r--r-- | include/linux/suspend.h | 13 |
2 files changed, 9 insertions, 10 deletions
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h index 24751df791ac..568135fe52ea 100644 --- a/include/asm-powerpc/mpc52xx.h +++ b/include/asm-powerpc/mpc52xx.h @@ -18,6 +18,8 @@ #include <asm/prom.h> #endif /* __ASSEMBLY__ */ +#include <linux/suspend.h> + /* ======================================================================== */ /* Structures mapping of some unit register set */ @@ -267,9 +269,9 @@ extern int mpc52xx_set_wakeup_gpio(u8 pin, u8 level); extern int __init lite5200_pm_init(void); /* lite5200 calls mpc5200 suspend functions, so here they are */ -extern int mpc52xx_pm_prepare(suspend_state_t); +extern int mpc52xx_pm_prepare(void); extern int mpc52xx_pm_enter(suspend_state_t); -extern int mpc52xx_pm_finish(suspend_state_t); +extern void mpc52xx_pm_finish(void); extern char saved_sram[0x4000]; /* reuse buffer from mpc52xx suspend */ #endif #endif /* CONFIG_PM */ diff --git a/include/linux/suspend.h b/include/linux/suspend.h index dce47825dbb8..541f0c46d34f 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -46,12 +46,10 @@ typedef int __bitwise suspend_state_t; * @prepare() fails. If @set_target() fails (ie. returns nonzero), * @prepare(), @enter() and @finish() will not be called by the PM core. * This callback is optional. However, if it is implemented, the argument - * passed to @prepare(), @enter() and @finish() is meaningless and should - * be ignored. + * passed to @enter() is meaningless and should be ignored. * * @prepare: Prepare the platform for entering the system sleep state indicated - * by @set_target() or represented by the argument if @set_target() is not - * implemented. + * by @set_target(). * @prepare() is called right after devices have been suspended (ie. the * appropriate .suspend() method has been executed for each device) and * before the nonboot CPUs are disabled (it is executed with IRQs enabled). @@ -67,8 +65,7 @@ typedef int __bitwise suspend_state_t; * * @finish: Called when the system has just left a sleep state, right after * the nonboot CPUs have been enabled and before devices are resumed (it is - * executed with IRQs enabled). If @set_target() is not implemented, the - * argument represents the sleep state being left. + * executed with IRQs enabled). * This callback is optional, but should be implemented by the platforms * that implement @prepare(). If implemented, it is always called after * @enter() (even if @enter() fails). @@ -76,9 +73,9 @@ typedef int __bitwise suspend_state_t; struct platform_suspend_ops { int (*valid)(suspend_state_t state); int (*set_target)(suspend_state_t state); - int (*prepare)(suspend_state_t state); + int (*prepare)(void); int (*enter)(suspend_state_t state); - int (*finish)(suspend_state_t state); + void (*finish)(void); }; #ifdef CONFIG_SUSPEND |