login
Header Space

 
 

[RFC][PATCH 7/7] ACPI: Print message before calling _PTS

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: ACPI Devel Maling List <linux-acpi@...>
Cc: Arjan van de Ven <arjan@...>, Carlos Corbacho <carlos@...>, Linus Torvalds <torvalds@...>, LKML <linux-kernel@...>, Pavel Machek <pavel@...>, pm list <linux-pm@...>, Andrew Morton <akpm@...>, Len Brown <lenb@...>, Alexey Starikovskiy <aystarik@...>, Moore, Robert <robert.moore@...>
Date: Thursday, December 27, 2007 - 2:20 pm

From: Rafael J. Wysocki <rjw@sisk.pl>

Make acpi_sleep_prepare() static and cause it to print a message
specifying the ACPI system sleep state to be entered (helpful for
debugging the suspend/hibernation code).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/acpi/sleep/main.c  |    4 +++-
 drivers/acpi/sleep/sleep.h |    2 --
 2 files changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/acpi/sleep/main.c
===================================================================
--- linux-2.6.orig/drivers/acpi/sleep/main.c
+++ linux-2.6/drivers/acpi/sleep/main.c
@@ -29,7 +29,7 @@ static u32 acpi_target_sleep_state = ACP
 static bool acpi_sleep_finish_wake_up;
 #endif
 
-int acpi_sleep_prepare(u32 acpi_state)
+static int acpi_sleep_prepare(u32 acpi_state)
 {
 #ifdef CONFIG_ACPI_SLEEP
 	/* do we have a wakeup address for S2 and S3? */
@@ -45,6 +45,8 @@ int acpi_sleep_prepare(u32 acpi_state)
 	ACPI_FLUSH_CPU_CACHE();
 	acpi_enable_wakeup_device_prep(acpi_state);
 #endif
+	printk(KERN_INFO PREFIX "Preparing to enter system sleep state S%d\n",
+		acpi_state);
 	acpi_enter_sleep_state_prep(acpi_state);
 	return 0;
 }
Index: linux-2.6/drivers/acpi/sleep/sleep.h
===================================================================
--- linux-2.6.orig/drivers/acpi/sleep/sleep.h
+++ linux-2.6/drivers/acpi/sleep/sleep.h
@@ -5,5 +5,3 @@ extern int acpi_suspend (u32 state);
 extern void acpi_enable_wakeup_device_prep(u8 sleep_state);
 extern void acpi_enable_wakeup_device(u8 sleep_state);
 extern void acpi_disable_wakeup_device(u8 sleep_state);
-
-extern int acpi_sleep_prepare(u32 acpi_state);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][PATCH 0/7] Fix the ACPI 1.0 vs ACPI 2.0 suspend orderi..., Rafael J. Wysocki, (Thu Dec 27, 2:03 pm)
Re: [RFC][PATCH 0/7] Fix the ACPI 1.0 vs ACPI 2.0 suspend or..., Rafael J. Wysocki, (Thu Dec 27, 6:40 pm)
[RFC][PATCH 6/7] Hibernation: Call _PTS early on ACPI 1.0x s..., Rafael J. Wysocki, (Thu Dec 27, 2:19 pm)
[RFC][PATCH 7/7] ACPI: Print message before calling _PTS, Rafael J. Wysocki, (Thu Dec 27, 2:20 pm)
[RFC][PATCH 4/7] Suspend: Call _PTS early on ACPI 1.0x systems, Rafael J. Wysocki, (Thu Dec 27, 2:17 pm)
[RFC][PATCH 3/7] ACPI: Separate disabling of GPEs from _PTS, Rafael J. Wysocki, (Thu Dec 27, 2:16 pm)
[RFC][PATCH 5/7] Hibernation: Introduce open() and close() c..., Rafael J. Wysocki, (Thu Dec 27, 2:18 pm)
[RFC][PATCH 2/7] ACPI: Separate invocations of _GTS and _BFS..., Rafael J. Wysocki, (Thu Dec 27, 2:15 pm)
[RFC][PATCH 1/7] Suspend: Introduce open() and close() callb..., Rafael J. Wysocki, (Thu Dec 27, 2:13 pm)
speck-geostationary