From: "Rafael J. Wysocki" Signed-off-by: Rafael J. Wysocki Cc: Arnd Bergmann Signed-off-by: Andrew Morton --- kernel/power/power.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff -puN kernel/power/power.h~swsusp-add-ioctl-for-swap-files-support-fix kernel/power/power.h --- a/kernel/power/power.h~swsusp-add-ioctl-for-swap-files-support-fix +++ a/kernel/power/power.h @@ -106,6 +106,16 @@ extern int snapshot_write_next(struct sn extern int snapshot_image_loaded(struct snapshot_handle *handle); extern void snapshot_free_unused_memory(struct snapshot_handle *handle); +/* + * This structure is used to pass the values needed for the identification + * of the resume swap area from a user space to the kernel via the + * SNAPSHOT_SET_SWAP_AREA ioctl + */ +struct resume_swap_area { + loff_t offset; + u_int32_t dev; +} __attribute__((packed)); + #define SNAPSHOT_IOC_MAGIC '3' #define SNAPSHOT_FREEZE _IO(SNAPSHOT_IOC_MAGIC, 1) #define SNAPSHOT_UNFREEZE _IO(SNAPSHOT_IOC_MAGIC, 2) @@ -119,19 +129,10 @@ extern void snapshot_free_unused_memory( #define SNAPSHOT_SET_SWAP_FILE _IOW(SNAPSHOT_IOC_MAGIC, 10, unsigned int) #define SNAPSHOT_S2RAM _IO(SNAPSHOT_IOC_MAGIC, 11) #define SNAPSHOT_PMOPS _IOW(SNAPSHOT_IOC_MAGIC, 12, unsigned int) -#define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, void *) +#define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, \ + struct resume_swap_area) #define SNAPSHOT_IOC_MAXNR 13 -/* - * This structure is used to pass the values needed for the identification - * of the resume swap area from a user space to the kernel via the - * SNAPSHOT_SET_SWAP_AREA ioctl - */ -struct resume_swap_area { - loff_t offset; - u_int32_t dev; -} __attribute__((packed)); - #define PMOPS_PREPARE 1 #define PMOPS_ENTER 2 #define PMOPS_FINISH 3 _