diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/swap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index a0e4a86ccf94..b019609d1b45 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c | |||
@@ -223,7 +223,7 @@ static int swsusp_swap_check(void) | |||
223 | return res; | 223 | return res; |
224 | 224 | ||
225 | root_swap = res; | 225 | root_swap = res; |
226 | res = blkdev_get(hib_resume_bdev, FMODE_WRITE); | 226 | res = blkdev_get(hib_resume_bdev, FMODE_WRITE, NULL); |
227 | if (res) | 227 | if (res) |
228 | return res; | 228 | return res; |
229 | 229 | ||
@@ -907,7 +907,8 @@ int swsusp_check(void) | |||
907 | { | 907 | { |
908 | int error; | 908 | int error; |
909 | 909 | ||
910 | hib_resume_bdev = open_by_devnum(swsusp_resume_device, FMODE_READ); | 910 | hib_resume_bdev = blkdev_get_by_dev(swsusp_resume_device, |
911 | FMODE_READ, NULL); | ||
911 | if (!IS_ERR(hib_resume_bdev)) { | 912 | if (!IS_ERR(hib_resume_bdev)) { |
912 | set_blocksize(hib_resume_bdev, PAGE_SIZE); | 913 | set_blocksize(hib_resume_bdev, PAGE_SIZE); |
913 | clear_page(swsusp_header); | 914 | clear_page(swsusp_header); |