Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-08 Thread Rafael J. Wysocki
On Tuesday, 8 May 2007 10:41, Johannes Berg wrote: > On Mon, 2007-05-07 at 23:35 +0200, Rafael J. Wysocki wrote: > > > > Also, you could then simplify all the instances of > > > (hibernation_mode == HIBERNATION_PLATFORM && hibernation_ops) > > > to just > > > (hibernation_mode == HIBERNATION_

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-08 Thread Johannes Berg
On Mon, 2007-05-07 at 23:35 +0200, Rafael J. Wysocki wrote: > > Also, you could then simplify all the instances of > > (hibernation_mode == HIBERNATION_PLATFORM && hibernation_ops) > > to just > > (hibernation_mode == HIBERNATION_PLATFORM) > > in various if statements and other places. > > N

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-07 Thread Rafael J. Wysocki
On Monday, 7 May 2007 13:56, Johannes Berg wrote: > On Mon, 2007-05-07 at 13:46 +0200, Johannes Berg wrote: > > On Sat, 2007-05-05 at 15:50 +0200, Rafael J. Wysocki wrote: > > > > > @@ -60,6 +60,9 @@ void hibernation_set_ops(struct hibernat > > > } > > > mutex_lock(&pm_mutex); > > > hibernat

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-07 Thread Johannes Berg
On Mon, 2007-05-07 at 13:46 +0200, Johannes Berg wrote: > On Sat, 2007-05-05 at 15:50 +0200, Rafael J. Wysocki wrote: > > > @@ -60,6 +60,9 @@ void hibernation_set_ops(struct hibernat > > } > > mutex_lock(&pm_mutex); > > hibernation_ops = ops; > > + if (ops) > > + hibernatio

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-07 Thread Johannes Berg
On Sat, 2007-05-05 at 15:50 +0200, Rafael J. Wysocki wrote: > @@ -60,6 +60,9 @@ void hibernation_set_ops(struct hibernat > } > mutex_lock(&pm_mutex); > hibernation_ops = ops; > + if (ops) > + hibernation_mode = HIBERNATION_PLATFORM; else if (hibernation_m

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-05 Thread Pavel Machek
Hi! > > > Power off the system instead of halting it if the 'platform' mode of > > > hibernation > > > has been requested, but hibernation_ops is not set. > > > > Ehm, unless you made a mistake in the patch then that shouldn't be > > possible. > > Hmm, right, but the patch is correct neverthele

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-05 Thread Jason L Tibbitts III
> "AM" == Andrew Morton <[EMAIL PROTECTED]> writes: AM> This causes the long-suffering Vaio to fail to power off during AM> suspend to disk. It says "Please power me down manually". Interesting; I'm seeing exactly the same thing on a Vaio TXN17P, which popped up somewhere between Fedora's 2.

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-05 Thread Johannes Berg
On Sat, 2007-05-05 at 14:21 +0200, Rafael J. Wysocki wrote: > > Power off the system instead of halting it if the 'platform' mode of > hibernation > has been requested, but hibernation_ops is not set. Ehm, unless you made a mistake in the patch then that shouldn't be possible. johannes signat

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-05 Thread Rafael J. Wysocki
On Saturday, 5 May 2007 08:31, Andrew Morton wrote: > On Fri, 4 May 2007 11:32:31 +0200 "Rafael J. Wysocki" <[EMAIL PROTECTED]> > wrote: > > > Separate the hibernation (aka suspend to disk code) from the other suspend > > code. > > In particular: > > * Remove the definitions related to hibernat

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-05 Thread Rafael J. Wysocki
On Saturday, 5 May 2007 12:16, Rafael J. Wysocki wrote: > On Saturday, 5 May 2007 08:31, Andrew Morton wrote: > > On Fri, 4 May 2007 11:32:31 +0200 "Rafael J. Wysocki" <[EMAIL PROTECTED]> > > wrote: > > > > > Separate the hibernation (aka suspend to disk code) from the other > > > suspend code.

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-05 Thread Rafael J. Wysocki
On Saturday, 5 May 2007 14:27, Johannes Berg wrote: > On Sat, 2007-05-05 at 14:21 +0200, Rafael J. Wysocki wrote: > > > > Power off the system instead of halting it if the 'platform' mode of > > hibernation > > has been requested, but hibernation_ops is not set. > > Ehm, unless you made a mistak

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-04 Thread Andrew Morton
On Fri, 4 May 2007 11:32:31 +0200 "Rafael J. Wysocki" <[EMAIL PROTECTED]> wrote: > Separate the hibernation (aka suspend to disk code) from the other suspend > code. > In particular: > * Remove the definitions related to hibernation from include/linux/pm.h > * Introduce struct hibernation_ops a

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-04 Thread Rafael J. Wysocki
On Friday, 4 May 2007 19:22, Satyam Sharma wrote: > Trivial suggestions: > > On 5/4/07, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > > --- linux-2.6.21.orig/include/linux/suspend.h 2007-05-02 > > 22:08:58.0 +0200 > > +++ linux-2.6.21/include/linux/suspend.h2007-05-03 > > 15:2

Re: [PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-04 Thread Satyam Sharma
Trivial suggestions: On 5/4/07, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: --- linux-2.6.21.orig/include/linux/suspend.h 2007-05-02 22:08:58.0 +0200 +++ linux-2.6.21/include/linux/suspend.h2007-05-03 15:22:24.0 +0200 [...] +/** + * hibernation_set_ops - set the glob

[PATCH -mm] PM: Separate hibernation code from suspend code

2007-05-04 Thread Rafael J. Wysocki
From: Rafael J. Wysocki <[EMAIL PROTECTED]>, Johannes Berg <[EMAIL PROTECTED]> Separate the hibernation (aka suspend to disk code) from the other suspend code. In particular: * Remove the definitions related to hibernation from include/linux/pm.h * Introduce struct hibernation_ops and a new hibe