Hibernation: Move function prototypes to header
authorAdrian Bunk <bunk@kernel.org>
Mon, 19 Nov 2007 22:36:20 +0000 (23:36 +0100)
committerLen Brown <len.brown@intel.com>
Fri, 1 Feb 2008 23:30:53 +0000 (18:30 -0500)
This patch moves the prototypes of count_highmem_pages() and
restore_highmem() to kernel/power/power.h

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
kernel/power/power.h
kernel/power/snapshot.c
kernel/power/swsusp.c

index ef9060576a40a65df08e038f41244b018e4698aa..c5321eb1f7c8d03eacff859864768e091fa2079e 100644 (file)
@@ -180,3 +180,11 @@ static inline int pm_notifier_call_chain(unsigned long val)
        return (blocking_notifier_call_chain(&pm_chain_head, val, NULL)
                        == 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
index c5ce0f34a5d4ffd7ab143f729257951b818cfd68..1ec3eccb1a343f7293fadf3aa7dd227d94ffd25b 100644 (file)
@@ -872,7 +872,6 @@ unsigned int count_highmem_pages(void)
 }
 #else
 static inline void *saveable_highmem_page(unsigned long pfn) { return NULL; }
-static inline unsigned int count_highmem_pages(void) { return 0; }
 #endif /* CONFIG_HIGHMEM */
 
 /**
index e1722d3155f17057284ab6374b3a00b9a31ed1d2..605c536795ba8134983ce6ebfc553dad18c1d5d1 100644 (file)
@@ -64,14 +64,6 @@ unsigned long image_size = 500 * 1024 * 1024;
 
 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
  *     swap pages, so that they can be freed in case of an error.