All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Len Brown <lenb@kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	Pavel Machek <pavel@ucw.cz>,
	Johannes Berg <johannes@sipsolutions.net>,
	pm list <linux-pm@lists.linux-foundation.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Adrian Bunk <bunk@kernel.org>
Subject: [PATCH 2/8] Hibernation: Move function prototypes to header
Date: Mon, 19 Nov 2007 23:36:20 +0100	[thread overview]
Message-ID: <200711192336.21264.rjw@sisk.pl> (raw)
In-Reply-To: <200711192332.15078.rjw@sisk.pl>

From: Adrian Bunk <bunk@kernel.org>

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>
---
 kernel/power/power.h    |    8 ++++++++
 kernel/power/snapshot.c |    1 -
 kernel/power/swsusp.c   |    8 --------
 3 files changed, 8 insertions(+), 9 deletions(-)

20af06052a0203d9e60b4937282793900c756182 
diff --git a/kernel/power/power.h b/kernel/power/power.h
index 195dc46..3fe1e7f 100644
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -211,3 +211,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
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 78039b4..d9ed1ff 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -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 */
 
 /**
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c
index e1722d3..605c536 100644
--- a/kernel/power/swsusp.c
+++ b/kernel/power/swsusp.c
@@ -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.




  parent reply	other threads:[~2007-11-19 22:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19 22:32 [PATCH 0/8] Suspend/hibernation patches for 2.6.25 Rafael J. Wysocki
2007-11-19 22:33 ` [PATCH 1/8] ACPI: Fix mismerge in acpi_hibernation_finish Rafael J. Wysocki
2007-11-19 22:33 ` Rafael J. Wysocki
2007-11-19 22:36 ` Rafael J. Wysocki [this message]
2007-11-19 22:36 ` [PATCH 2/8] Hibernation: Move function prototypes to header Rafael J. Wysocki
2007-11-19 22:38 ` [PATCH 3/8] Hibernation: Add PM_RESTORE_PREPARE and PM_POST_RESTORE notifiers (rev. 2) Rafael J. Wysocki
2007-11-19 22:38 ` Rafael J. Wysocki
2007-11-19 22:41 ` [PATCH 4/8] Suspend: Testing facility " Rafael J. Wysocki
2007-11-19 22:41 ` Rafael J. Wysocki
2007-11-19 22:42 ` [PATCH 5/8] Hibernation: New testing " Rafael J. Wysocki
2007-11-19 22:42 ` Rafael J. Wysocki
2007-11-19 22:43 ` [PATCH 6/8] PM: Suspend/hibernation debug documentation update " Rafael J. Wysocki
2007-11-19 22:43 ` Rafael J. Wysocki
2007-11-19 22:46 ` [PATCH 7/8] PM: Make PM_TRACE more architecture independent Rafael J. Wysocki
2007-11-19 22:46 ` Rafael J. Wysocki
2007-11-19 22:49 ` [PATCH 8/8] PM: Convert PM notifiers to out-of-line code Rafael J. Wysocki
2007-11-19 22:49 ` Rafael J. Wysocki
2007-11-20  6:41 ` [PATCH 0/8] Suspend/hibernation patches for 2.6.25 Len Brown
2007-11-20 23:59   ` Rafael J. Wysocki
2007-11-21  1:13     ` Len Brown
2007-11-21  1:13     ` Len Brown
2007-11-20 23:59   ` Rafael J. Wysocki
2007-11-20  6:41 ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200711192336.21264.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=bunk@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=pavel@ucw.cz \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.