Re: [PATCH] Suspend2 Merge: Supress various actions/errors while suspending [1/5]

Adam Kropelin
2004-09-17T01:20:19Z

On Fri, Sep 17, 2004 at 09:51:03AM +1000, Nigel Cunningham wrote:
> +#ifdef CONFIG_SOFTWARE_SUSPEND2
> + if (software_suspend_state & SOFTWARE_SUSPEND_RUNNING)
> + return;
> +#endif
> spin_lock(&oom_lock);
> now = jiffies;
> since = now - last;

Any chance you could...

#ifdef CONFIG_SOFTWARE_SUSPEND2
<whatever-it-is-now>
#else
#define software_suspend_state 0
#endif

...and thereby eliminate all the #ifdefs in the main codepaths?

--Adam