summaryrefslogtreecommitdiffstats
path: root/kernel/power/disk.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-11-19 23:38:25 +0100
committerLen Brown <len.brown@intel.com>2008-02-01 18:30:53 -0500
commitc3e94d899c864e558f938f9845ddb8c2e5d5ccd0 (patch)
treecdc2d5007e2d8053ab1903f9e66c46dca9a9de81 /kernel/power/disk.c
parent2f8ed1c60b06b797bf79a1dc540f0bed8c9d75a0 (diff)
downloadop-kernel-dev-c3e94d899c864e558f938f9845ddb8c2e5d5ccd0.zip
op-kernel-dev-c3e94d899c864e558f938f9845ddb8c2e5d5ccd0.tar.gz
Hibernation: Add PM_RESTORE_PREPARE and PM_POST_RESTORE notifiers (rev. 2)
Add PM_RESTORE_PREPARE and PM_POST_RESTORE notifiers to the PM core, to be used in analogy with the existing PM_HIBERNATION_PREPARE and PM_POST_HIBERNATION notifiers. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r--kernel/power/disk.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index b138b43..6597365 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -499,6 +499,10 @@ static int software_resume(void)
goto Unlock;
}
+ error = pm_notifier_call_chain(PM_RESTORE_PREPARE);
+ if (error)
+ goto Finish;
+
error = create_basic_memory_bitmaps();
if (error)
goto Finish;
@@ -522,6 +526,7 @@ static int software_resume(void)
Done:
free_basic_memory_bitmaps();
Finish:
+ pm_notifier_call_chain(PM_POST_RESTORE);
atomic_inc(&snapshot_device_available);
/* For success case, the suspend path will release the lock */
Unlock:
OpenPOWER on IntegriCloud