]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
swsusp: fix hibernation code ordering
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 19 Jul 2007 08:47:31 +0000 (01:47 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 19 Jul 2007 17:04:42 +0000 (10:04 -0700)
commit10a1803d667e209914eaada9b95525252f23ec78
tree0969e95d7f55d62aa8a5a3a0dd616fe4e151323e
parenta634cc10164d1c229fbeca33923e6a0ed939e894
swsusp: fix hibernation code ordering

Change the code ordering so that hibernation_ops->prepare() is called after
device_suspend().  This is needed so that we don't violate the ACPI
specification, which states that the _PTS and _GTS system-control methods,
executed from acpi_sleep_prepare(), ought to be called after devices have been
put in low power states.

The "Finish" label in hibernation_restore() is moved, because device_suspend()
resumes devices if the suspending of them fails and the restore code ordering
should reflect the hibernation code ordering.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/power/disk.c