aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/user.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/user.c')
-rw-r--r--kernel/power/user.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c
index 4c24ca5d62e3..a327b18a5ffd 100644
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -55,7 +55,8 @@ static int snapshot_open(struct inode *inode, struct file *filp)
55 filp->private_data = data; 55 filp->private_data = data;
56 memset(&data->handle, 0, sizeof(struct snapshot_handle)); 56 memset(&data->handle, 0, sizeof(struct snapshot_handle));
57 if ((filp->f_flags & O_ACCMODE) == O_RDONLY) { 57 if ((filp->f_flags & O_ACCMODE) == O_RDONLY) {
58 data->swap = swsusp_resume_device ? swap_type_of(swsusp_resume_device) : -1; 58 data->swap = swsusp_resume_device ?
59 swap_type_of(swsusp_resume_device, 0) : -1;
59 data->mode = O_RDONLY; 60 data->mode = O_RDONLY;
60 } else { 61 } else {
61 data->swap = -1; 62 data->swap = -1;
@@ -265,7 +266,7 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
265 * so we need to recode them 266 * so we need to recode them
266 */ 267 */
267 if (old_decode_dev(arg)) { 268 if (old_decode_dev(arg)) {
268 data->swap = swap_type_of(old_decode_dev(arg)); 269 data->swap = swap_type_of(old_decode_dev(arg), 0);
269 if (data->swap < 0) 270 if (data->swap < 0)
270 error = -ENODEV; 271 error = -ENODEV;
271 } else { 272 } else {