projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
power
/
user.c
diff --git
a/kernel/power/user.c
b/kernel/power/user.c
index 957f06164ad1004b0050dbdcb7563c91c3755e55..98d357584cd6bad7bdc87cbc63e5c296a8393b60 100644
(file)
--- a/
kernel/power/user.c
+++ b/
kernel/power/user.c
@@
-36,9
+36,9
@@
static struct snapshot_data {
struct snapshot_handle handle;
int swap;
int mode;
struct snapshot_handle handle;
int swap;
int mode;
-
char
frozen;
-
char
ready;
-
char
platform_support;
+
bool
frozen;
+
bool
ready;
+
bool
platform_support;
bool free_bitmaps;
} snapshot_state;
bool free_bitmaps;
} snapshot_state;
@@
-70,6
+70,7
@@
static int snapshot_open(struct inode *inode, struct file *filp)
data->swap = swsusp_resume_device ?
swap_type_of(swsusp_resume_device, 0, NULL) : -1;
data->mode = O_RDONLY;
data->swap = swsusp_resume_device ?
swap_type_of(swsusp_resume_device, 0, NULL) : -1;
data->mode = O_RDONLY;
+ data->free_bitmaps = false;
error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE);
if (error)
pm_notifier_call_chain(PM_POST_HIBERNATION);
error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE);
if (error)
pm_notifier_call_chain(PM_POST_HIBERNATION);
@@
-93,9
+94,9
@@
static int snapshot_open(struct inode *inode, struct file *filp)
if (error)
atomic_inc(&snapshot_device_available);
if (error)
atomic_inc(&snapshot_device_available);
- data->frozen =
0
;
- data->ready =
0
;
- data->platform_support =
0
;
+ data->frozen =
false
;
+ data->ready =
false
;
+ data->platform_support =
false
;
Unlock:
unlock_system_sleep();
Unlock:
unlock_system_sleep();
@@
-229,7
+230,7
@@
static long snapshot_ioctl(struct file *filp, unsigned int cmd,
if (error)
thaw_processes();
else
if (error)
thaw_processes();
else
- data->frozen =
1
;
+ data->frozen =
true
;
break;
break;
@@
-240,7
+241,7
@@
static long snapshot_ioctl(struct file *filp, unsigned int cmd,
free_basic_memory_bitmaps();
data->free_bitmaps = false;
thaw_processes();
free_basic_memory_bitmaps();
data->free_bitmaps = false;
thaw_processes();
- data->frozen =
0
;
+ data->frozen =
false
;
break;
case SNAPSHOT_CREATE_IMAGE:
break;
case SNAPSHOT_CREATE_IMAGE:
@@
-270,7
+271,7
@@
static long snapshot_ioctl(struct file *filp, unsigned int cmd,
case SNAPSHOT_FREE:
swsusp_free();
memset(&data->handle, 0, sizeof(struct snapshot_handle));
case SNAPSHOT_FREE:
swsusp_free();
memset(&data->handle, 0, sizeof(struct snapshot_handle));
- data->ready =
0
;
+ data->ready =
false
;
/*
* It is necessary to thaw kernel threads here, because
* SNAPSHOT_CREATE_IMAGE may be invoked directly after
/*
* It is necessary to thaw kernel threads here, because
* SNAPSHOT_CREATE_IMAGE may be invoked directly after
@@
-334,7
+335,7
@@
static long snapshot_ioctl(struct file *filp, unsigned int cmd,
* PM_HIBERNATION_PREPARE
*/
error = suspend_devices_and_enter(PM_SUSPEND_MEM);
* PM_HIBERNATION_PREPARE
*/
error = suspend_devices_and_enter(PM_SUSPEND_MEM);
- data->ready =
0
;
+ data->ready =
false
;
break;
case SNAPSHOT_PLATFORM_SUPPORT:
break;
case SNAPSHOT_PLATFORM_SUPPORT: