[linux-pm] [PATCH 2/4] ACPI hibernate: Add a mechanism to save/restore ACPI NVS memory

Pavel Machek pavel at suse.cz
Tue Nov 18 08:14:56 PST 2008


Hi!

> > >  #else /* CONFIG_HIBERNATION */
> > >  static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
> > >  static inline void swsusp_set_page_free(struct page *p) {}
> > > @@ -241,6 +246,14 @@ static inline void swsusp_unset_page_fre
> > >  static inline void hibernation_set_ops(struct platform_hibernation_ops *ops) {}
> > >  static inline int hibernate(void) { return -ENOSYS; }
> > >  static inline bool system_entering_hibernation(void) { return false; }
> > > +static inline int hibernate_nvs_register(unsigned long a, unsigned long b)
> > > +{
> > > +	return 0;
> > > +}
> > > +static inline int hibernate_nvs_alloc(void) { return 0; }
> > > +static inline void hibernate_nvs_free(void) {}
> > > +static inline void hibernate_nvs_save(void) {}
> > > +static inline void hibernate_nvs_restore(void) {}
> > >  #endif /* CONFIG_HIBERNATION */
> > 
> > Can someone call these for !hibernation case?
> 
> Not at the moment, but why not to add them?

Well, someone may call them, expecting them to save / restore nvs,
except that they will not be there. I'd prefer inlines not to exist
(so mistake is caught at compile time) or them to contain BUG(), so
that mistake is obvious.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


More information about the linux-pm mailing list