mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -mm] Hibernation: Resume consoles if hibernation_platform_enter fails
@ 2007-09-15 19:17 Rafael J. Wysocki
  0 siblings, 0 replies; only message in thread
From: Rafael J. Wysocki @ 2007-09-15 19:17 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Pavel Machek, Len Brown, pm list, ACPI Devel Maling List, LKML

[This is a fix on top of
hibernation-enter-platform-hibernation-state-in-a-consistent-way-rev-4.patch]
---
From: Rafael J. Wysocki <rjw@sisk.pl>

If hibernation_platform_enter() fails, consoles should be resumed so that
diagnostic information related to the failure is available to the user.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 kernel/power/disk.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6.23-rc6/kernel/power/disk.c
===================================================================
--- linux-2.6.23-rc6.orig/kernel/power/disk.c
+++ linux-2.6.23-rc6/kernel/power/disk.c
@@ -293,7 +293,7 @@ int hibernation_platform_enter(void)
 	suspend_console();
 	error = device_suspend(PMSG_SUSPEND);
 	if (error)
-		return error;
+		goto Resume_console;
 
 	error = hibernation_ops->prepare();
 	if (error)
@@ -320,6 +320,8 @@ int hibernation_platform_enter(void)
 	hibernation_ops->finish();
  Resume_devices:
 	device_resume();
+ Resume_console:
+	resume_console();
 	return error;
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-15 19:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-15 19:17 [PATCH -mm] Hibernation: Resume consoles if hibernation_platform_enter fails Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®