lkml.org 
[lkml]   [2006]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[Suspend2][ 14/16] [Suspend2] Try to suspend.
Date
Called when /proc/suspend2/do_suspend is written to. It is essentially a
wrapper around suspend_main(), invoking the start_anything and
finish_anything routines first.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

kernel/power/suspend.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 0f751d1..85307c6 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -1008,3 +1008,19 @@ void suspend2_try_resume(void)
suspend_finish_anything(0);
}

+/*
+ * suspend2_try_suspend
+ * Functionality : Wrapper around suspend_main.
+ * Called From : drivers/acpi/sleep/main.c
+ * kernel/reboot.c
+ */
+void suspend2_try_suspend(void)
+{
+ if (suspend_start_anything(0))
+ return;
+
+ suspend_main();
+
+ suspend_finish_anything(0);
+}
+
--
Nigel Cunningham nigel at suspend2 dot net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-27 01:44    [W:0.066 / U:0.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site