Re: [PATCH 1/8] PM: Add suspend block api.

Pavel Machek
2009-04-26T09:42:53Z

Hi!

> >> --- a/kernel/power/power.h
> >> +++ b/kernel/power/power.h
> >> @@ -223,3 +223,9 @@ static inline void suspend_thaw_processes(void)
> >>  {
> >>  }
> >>  #endif
> >> +
> >> +#ifdef CONFIG_SUSPEND_BLOCK
> >> +/* kernel/power/suspend_block.c */
> >> +void request_suspend_state(suspend_state_t state);
> >> +#endif
> >
> > Is the #ifdef really necessary?
> >
>
> No, but it gives a compile error instead of a link error if you call
> request_suspend_state when it is not available so it is useful.

I believe #ifdef is too ugly and link error is really good enough.

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html