[linux-pm] [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 2)

Rafael J. Wysocki rjw at sisk.pl
Wed Mar 26 13:46:38 PDT 2008


On Wednesday, 26 of March 2008, Alan Stern wrote:
> On Wed, 26 Mar 2008, Oliver Neukum wrote:
> 
> > Am Mittwoch, 26. März 2008 15:40:27 schrieb Alan Stern:
> > > Remember, the whole purpose of this is to let drivers know when the 
> > > system is going to sleep or waking up.  Proper handling of devices is 
> > > up to the drivers, not up to the core.
> > 
> > Then declare these methods void. We cannot introduce methods that deliberately
> > ignore errors. Reporting is also better done in the drivers.
> 
> That decision is up to Rafael.  Changing the methods to return void is 
> okay with me.

But that's not what they currently do, either.

If I change the methods to void and it turns out in the future that it's
better if they return error codes, it will be rather difficult to go back and
change everything.  For this reason, I'd prefer to retain the returning of
error codes.

What exactly do you whink would be wrong with using the error codes to avoid
resuming the children of devices that failed to resume?

Rafael


More information about the linux-pm mailing list