Suspend 2 merge: 8/51: /proc/acpi/sleep hook.

Nigel Cunningham
2004-11-24T13:05:04Z

Same thing as the previous patch, but for /proc/acpi/sleep.

diff -ruN 301-proc-acpi-sleep-activate-hook-old/drivers/acpi/sleep/proc.c 301-proc-acpi-sleep-activate-hook-new/drivers/acpi/sleep/proc.c
--- 301-proc-acpi-sleep-activate-hook-old/drivers/acpi/sleep/proc.c 2004-11-03 21:54:15.000000000 +1100
+++ 301-proc-acpi-sleep-activate-hook-new/drivers/acpi/sleep/proc.c 2004-11-05 21:35:42.000000000 +1100
@@ -68,6 +68,17 @@
goto Done;
}
state = simple_strtoul(str, NULL, 0);
+#ifdef CONFIG_SOFTWARE_SUSPEND2
+ /*
+ * I used to put this after the CONFIG_SOFTWARE_SUSPEND
+ * test, but people who compile in suspend2 usually want
+ * to use it instead of swsusp. --NC
+ */
+ if (state == 4) {
+ suspend_try_suspend();
+ goto Done;
+ }
+#endif
#ifdef CONFIG_SOFTWARE_SUSPEND
if (state == 4) {
software_suspend();