diff options
Diffstat (limited to 'kernel/power/user.c')
-rw-r--r-- | kernel/power/user.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c index bd1771f7a64e..72dbfd01408e 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c | |||
@@ -40,21 +40,21 @@ static struct snapshot_data { | |||
40 | char platform_suspend; | 40 | char platform_suspend; |
41 | } snapshot_state; | 41 | } snapshot_state; |
42 | 42 | ||
43 | static atomic_t device_available = ATOMIC_INIT(1); | 43 | atomic_t snapshot_device_available = ATOMIC_INIT(1); |
44 | 44 | ||
45 | static int snapshot_open(struct inode *inode, struct file *filp) | 45 | static int snapshot_open(struct inode *inode, struct file *filp) |
46 | { | 46 | { |
47 | struct snapshot_data *data; | 47 | struct snapshot_data *data; |
48 | 48 | ||
49 | if (!atomic_add_unless(&device_available, -1, 0)) | 49 | if (!atomic_add_unless(&snapshot_device_available, -1, 0)) |
50 | return -EBUSY; | 50 | return -EBUSY; |
51 | 51 | ||
52 | if ((filp->f_flags & O_ACCMODE) == O_RDWR) { | 52 | if ((filp->f_flags & O_ACCMODE) == O_RDWR) { |
53 | atomic_inc(&device_available); | 53 | atomic_inc(&snapshot_device_available); |
54 | return -ENOSYS; | 54 | return -ENOSYS; |
55 | } | 55 | } |
56 | if(create_basic_memory_bitmaps()) { | 56 | if(create_basic_memory_bitmaps()) { |
57 | atomic_inc(&device_available); | 57 | atomic_inc(&snapshot_device_available); |
58 | return -ENOMEM; | 58 | return -ENOMEM; |
59 | } | 59 | } |
60 | nonseekable_open(inode, filp); | 60 | nonseekable_open(inode, filp); |
@@ -92,7 +92,7 @@ static int snapshot_release(struct inode *inode, struct file *filp) | |||
92 | enable_nonboot_cpus(); | 92 | enable_nonboot_cpus(); |
93 | mutex_unlock(&pm_mutex); | 93 | mutex_unlock(&pm_mutex); |
94 | } | 94 | } |
95 | atomic_inc(&device_available); | 95 | atomic_inc(&snapshot_device_available); |
96 | return 0; | 96 | return 0; |
97 | } | 97 | } |
98 | 98 | ||