diff options
Diffstat (limited to 'include/linux/suspend.h')
-rw-r--r-- | include/linux/suspend.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index e8e6da394c9..388cace9751 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -24,7 +24,7 @@ struct pbe { extern void drain_local_pages(void); extern void mark_free_pages(struct zone *zone); -#if defined(CONFIG_PM) && defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) +#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) extern int pm_prepare_console(void); extern void pm_restore_console(void); #else @@ -54,8 +54,7 @@ struct hibernation_ops { void (*restore_cleanup)(void); }; -#ifdef CONFIG_PM -#ifdef CONFIG_SOFTWARE_SUSPEND +#ifdef CONFIG_HIBERNATION /* kernel/power/snapshot.c */ extern void __register_nosave_region(unsigned long b, unsigned long e, int km); static inline void register_nosave_region(unsigned long b, unsigned long e) @@ -73,15 +72,16 @@ extern unsigned long get_safe_page(gfp_t gfp_mask); extern void hibernation_set_ops(struct hibernation_ops *ops); extern int hibernate(void); -#else /* CONFIG_SOFTWARE_SUSPEND */ +#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) {} static inline void swsusp_unset_page_free(struct page *p) {} static inline void hibernation_set_ops(struct hibernation_ops *ops) {} static inline int hibernate(void) { return -ENOSYS; } -#endif /* CONFIG_SOFTWARE_SUSPEND */ +#endif /* CONFIG_HIBERNATION */ +#ifdef CONFIG_PM_SLEEP void save_processor_state(void); void restore_processor_state(void); struct saved_context; @@ -106,7 +106,7 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) { .notifier_call = fn, .priority = pri }; \ register_pm_notifier(&fn##_nb); \ } -#else /* CONFIG_PM */ +#else /* !CONFIG_PM_SLEEP */ static inline int register_pm_notifier(struct notifier_block *nb) { @@ -119,12 +119,15 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) } #define pm_notifier(fn, pri) do { (void)(fn); } while (0) -#endif /* CONFIG_PM */ +#endif /* !CONFIG_PM_SLEEP */ -#if !defined CONFIG_SOFTWARE_SUSPEND || !defined(CONFIG_PM) +#ifndef CONFIG_HIBERNATION static inline void register_nosave_region(unsigned long b, unsigned long e) { } +static inline void register_nosave_region_late(unsigned long b, unsigned long e) +{ +} #endif #endif /* _LINUX_SWSUSP_H */ |