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

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

 



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);
> > >  	hibernation_ops = ops;
> > > +	if (ops)
> > > +		hibernation_mode = HIBERNATION_PLATFORM;
> > 
> > 	else if (hibernation_mode == HIBERNATION_PLATFORM)
> > 		hibernation_mode = HIBERNATION_SHUTDOWN;
> 
> 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.

No, that's not a good idea, because of the "reduce code duplication patch"
that I'd like to go on top of this.  I'd rather use 'if (hibernation_ops)' here. :-)

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