On Sun, 2007-06-24 at 22:44 +0200, Rafael J. Wysocki wrote:

> There is no reason why the .prepare() and .finish() methods in 'struct
> platform_suspend_operations' 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.

Nice cleanups, I'd wanted to do them when I was doing all that pm_ops
stuff but then didn't get around. Good stuff.
 
> --- linux-2.6.22-rc5.orig/arch/powerpc/platforms/52xx/mpc52xx_pm.c    
> 2007-06-24 20:45:21.000000000 +0200
> +++ linux-2.6.22-rc5/arch/powerpc/platforms/52xx/mpc52xx_pm.c 2007-06-24 
> 21:07:41.000000000 +0200

> -int mpc52xx_pm_prepare(suspend_state_t state)
> +static int mpc52xx_pm_prepare(void)
>  {
> -     if (state != PM_SUSPEND_STANDBY)
> -             return -EINVAL;
> -

Hm. I thought I'd told them to leave that out before it went in. Oh
well.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to