|
@@ -95,15 +95,15 @@ static int snapshot_open(struct inode *inode, struct file *filp)
|
|
|
data->swap = swsusp_resume_device ?
|
|
|
swap_type_of(swsusp_resume_device, 0, NULL) : -1;
|
|
|
data->mode = O_RDONLY;
|
|
|
- error = pm_notifier_call_chain(PM_RESTORE_PREPARE);
|
|
|
+ error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE);
|
|
|
if (error)
|
|
|
- pm_notifier_call_chain(PM_POST_RESTORE);
|
|
|
+ pm_notifier_call_chain(PM_POST_HIBERNATION);
|
|
|
} else {
|
|
|
data->swap = -1;
|
|
|
data->mode = O_WRONLY;
|
|
|
- error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE);
|
|
|
+ error = pm_notifier_call_chain(PM_RESTORE_PREPARE);
|
|
|
if (error)
|
|
|
- pm_notifier_call_chain(PM_POST_HIBERNATION);
|
|
|
+ pm_notifier_call_chain(PM_POST_RESTORE);
|
|
|
}
|
|
|
if (error)
|
|
|
atomic_inc(&snapshot_device_available);
|