Commit 949a5ed0 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge back earlier material related to system sleep for 7.1

parents a8d51efb 2b27ea5b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -14,8 +14,6 @@
#include <linux/kdebug.h>
#include <linux/pgtable.h>

#include <crypto/hash.h>

#include <asm/e820/api.h>
#include <asm/init.h>
#include <asm/proto.h>
+5 −2
Original line number Diff line number Diff line
@@ -322,11 +322,14 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
		error = snapshot_write_finalize(&data->handle);
		if (error)
			break;
		if (data->mode != O_WRONLY || !data->frozen ||
		    !snapshot_image_loaded(&data->handle)) {
		if (data->mode != O_WRONLY || !data->frozen) {
			error = -EPERM;
			break;
		}
		if (!snapshot_image_loaded(&data->handle)) {
			error = -ENODATA;
			break;
		}
		error = hibernation_restore(data->platform_support);
		break;