Re: [PATCH] swsusp: Use platform mode by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, 17 October 2007 05:44, Qi Yong wrote:
> On Wed, Oct 17, 2007 at 10:46:12AM +0800, Qi Yong wrote:
> > On 12/05/2007, Linus Torvalds <[email protected]> wrote:
> > > On Fri, 11 May 2007, Rafael J. Wysocki wrote:
[--snip--]
> 
> please apply.
> 
> Signed-off-by: Qi Yong <[email protected]>
> ---

With your patch applied the default for ACPI systems changes from
HIBERNATION_PLATFORM to HIBERNATION_SHUTDOWN.  However,
it has been HIBERNATION_PLATFORM since 2.6.20 and I'd really
prefer it to stay this way.

If HIBERNATION_PLATFORM doesn't work for you, please do
"echo shutdown > /sys/power/disk" before hibernation or, if you use the
userland suspend tools, change the s2disk's configuration file to use the
"shutdown" mode.

> diff --git a/kernel/power/disk.c b/kernel/power/disk.c
> index eb72255..95b66ee 100644
> --- a/kernel/power/disk.c
> +++ b/kernel/power/disk.c
> @@ -61,9 +61,11 @@ void hibernation_set_ops(struct hibernation_ops *ops)
>  	}
>  	mutex_lock(&pm_mutex);
>  	hibernation_ops = ops;
> -	if (ops)
> -		hibernation_mode = HIBERNATION_PLATFORM;
> -	else if (hibernation_mode == HIBERNATION_PLATFORM)
> +
> +	/*
> +	 * Turn off HIBERNATION_PLATFORM if we no longer have any platform ops.
> +	 */
> +	if (!ops && hibernation_mode == HIBERNATION_PLATFORM)
>  		hibernation_mode = HIBERNATION_SHUTDOWN;
>  
>  	mutex_unlock(&pm_mutex);

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux