Hi! > > We probably want to provide a global function saying something like > > suspend_in_progress() too, just in case a driver want to WARN/BUG_ON, or > > actually test if it can do something without having to track the > > pre-suspend and post-resume events. > > yes, better that than defining lots of flags on PM messages > (which was the previous notion) Ugh, no, flags should stay. suspend_in_progress() should be used for BUG_ON()'s etc, but little else. Drivers should not decide based on it. like if kmalloc is alocating with GFP_KERNEL, it should do BUG_ON(in_suspend())... [Hmm, and in_suspend() is probably better name, consistent with in_atomic() and in_interrupt().] Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!