aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/disk.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-11-19 17:38:25 -0500
committerLen Brown <len.brown@intel.com>2008-02-01 18:30:53 -0500
commitc3e94d899c864e558f938f9845ddb8c2e5d5ccd0 (patch)
treecdc2d5007e2d8053ab1903f9e66c46dca9a9de81 /kernel/power/disk.c
parent2f8ed1c60b06b797bf79a1dc540f0bed8c9d75a0 (diff)
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 b138b431e271..659736508239 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -499,6 +499,10 @@ static int software_resume(void)
499 goto Unlock; 499 goto Unlock;
500 } 500 }
501 501
502 error = pm_notifier_call_chain(PM_RESTORE_PREPARE);
503 if (error)
504 goto Finish;
505
502 error = create_basic_memory_bitmaps(); 506 error = create_basic_memory_bitmaps();
503 if (error) 507 if (error)
504 goto Finish; 508 goto Finish;
@@ -522,6 +526,7 @@ static int software_resume(void)
522 Done: 526 Done:
523 free_basic_memory_bitmaps(); 527 free_basic_memory_bitmaps();
524 Finish: 528 Finish:
529 pm_notifier_call_chain(PM_POST_RESTORE);
525 atomic_inc(&snapshot_device_available); 530 atomic_inc(&snapshot_device_available);
526 /* For success case, the suspend path will release the lock */ 531 /* For success case, the suspend path will release the lock */
527 Unlock: 532 Unlock: