]> git.karo-electronics.de Git - linux-beck.git/blobdiff - kernel/power/snapshot.c
Safer ABI for O_TMPFILE
[linux-beck.git] / kernel / power / snapshot.c
index 7872a35eafe754fb1cdb680ff579562b7f4a602b..349587bb03e1edb64dc5609eee61fdf90a517af0 100644 (file)
@@ -1652,7 +1652,7 @@ unsigned long snapshot_get_image_size(void)
 static int init_header(struct swsusp_info *info)
 {
        memset(info, 0, sizeof(struct swsusp_info));
-       info->num_physpages = num_physpages;
+       info->num_physpages = get_num_physpages();
        info->image_pages = nr_copy_pages;
        info->pages = snapshot_get_image_size();
        info->size = info->pages;
@@ -1796,7 +1796,7 @@ static int check_header(struct swsusp_info *info)
        char *reason;
 
        reason = check_image_kernel(info);
-       if (!reason && info->num_physpages != num_physpages)
+       if (!reason && info->num_physpages != get_num_physpages())
                reason = "memory size";
        if (reason) {
                printk(KERN_ERR "PM: Image mismatch: %s\n", reason);