Commit 2f8ed1c6 authored by Adrian Bunk's avatar Adrian Bunk Committed by Len Brown

Hibernation: Move function prototypes to header

This patch moves the prototypes of count_highmem_pages() and
restore_highmem() to kernel/power/power.h
Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 964756a5
...@@ -180,3 +180,11 @@ static inline int pm_notifier_call_chain(unsigned long val) ...@@ -180,3 +180,11 @@ static inline int pm_notifier_call_chain(unsigned long val)
return (blocking_notifier_call_chain(&pm_chain_head, val, NULL) return (blocking_notifier_call_chain(&pm_chain_head, val, NULL)
== NOTIFY_BAD) ? -EINVAL : 0; == NOTIFY_BAD) ? -EINVAL : 0;
} }
#ifdef CONFIG_HIGHMEM
unsigned int count_highmem_pages(void);
int restore_highmem(void);
#else
static inline unsigned int count_highmem_pages(void) { return 0; }
static inline int restore_highmem(void) { return 0; }
#endif
...@@ -872,7 +872,6 @@ unsigned int count_highmem_pages(void) ...@@ -872,7 +872,6 @@ unsigned int count_highmem_pages(void)
} }
#else #else
static inline void *saveable_highmem_page(unsigned long pfn) { return NULL; } static inline void *saveable_highmem_page(unsigned long pfn) { return NULL; }
static inline unsigned int count_highmem_pages(void) { return 0; }
#endif /* CONFIG_HIGHMEM */ #endif /* CONFIG_HIGHMEM */
/** /**
......
...@@ -64,14 +64,6 @@ unsigned long image_size = 500 * 1024 * 1024; ...@@ -64,14 +64,6 @@ unsigned long image_size = 500 * 1024 * 1024;
int in_suspend __nosavedata = 0; int in_suspend __nosavedata = 0;
#ifdef CONFIG_HIGHMEM
unsigned int count_highmem_pages(void);
int restore_highmem(void);
#else
static inline int restore_highmem(void) { return 0; }
static inline unsigned int count_highmem_pages(void) { return 0; }
#endif
/** /**
* The following functions are used for tracing the allocated * The following functions are used for tracing the allocated
* swap pages, so that they can be freed in case of an error. * swap pages, so that they can be freed in case of an error.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment