From e6c5eb9541f2197a3ffab90b1c7a3250a9b51bf6 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 18 Oct 2007 03:04:41 -0700 Subject: PM: Rework struct platform_suspend_ops MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Pavel Machek Cc: Len Brown Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/arm/mach-omap1/pm.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'arch/arm/mach-omap1') diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 8db38dd..3bf01e2 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -599,27 +599,15 @@ static void (*saved_idle)(void) = NULL; /* * omap_pm_prepare - Do preliminary suspend work. - * @state: suspend state we're entering. * */ -static int omap_pm_prepare(suspend_state_t state) +static int omap_pm_prepare(void) { - int error = 0; - /* We cannot sleep in idle until we have resumed */ saved_idle = pm_idle; pm_idle = NULL; - switch (state) - { - case PM_SUSPEND_STANDBY: - case PM_SUSPEND_MEM: - break; - default: - return -EINVAL; - } - - return error; + return 0; } @@ -647,16 +635,14 @@ static int omap_pm_enter(suspend_state_t state) /** * omap_pm_finish - Finish up suspend sequence. - * @state: State we're coming out of. * * This is called after we wake back up (or if entering the sleep state * failed). */ -static int omap_pm_finish(suspend_state_t state) +static void omap_pm_finish(void) { pm_idle = saved_idle; - return 0; } -- cgit v1.1