diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-17 12:31:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-17 12:31:59 -0500 |
commit | 508817e7cd8cb585148d12b5673202142ece2330 (patch) | |
tree | 5041771f203c906afce49d9e75e5e856f77a903f | |
parent | 8efc1a1a22e6daf9d669e6095460c77df683c325 (diff) | |
parent | f08f5a0add20834d3f3d876dfe08005a5df656db (diff) |
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM / Runtime: Fix pm_runtime_suspended()
PM / Hibernate: Restore old swap signature to avoid user space breakage
PM / Hibernate: Fix PM_POST_* notification with user-space suspend
-rw-r--r-- | Documentation/power/runtime_pm.txt | 4 | ||||
-rw-r--r-- | include/linux/pm_runtime.h | 3 | ||||
-rw-r--r-- | kernel/power/swap.c | 2 | ||||
-rw-r--r-- | kernel/power/user.c | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 489e9bacd165..41cc7b30d7dd 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
@@ -379,8 +379,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
379 | zero) | 379 | zero) |
380 | 380 | ||
381 | bool pm_runtime_suspended(struct device *dev); | 381 | bool pm_runtime_suspended(struct device *dev); |
382 | - return true if the device's runtime PM status is 'suspended', or false | 382 | - return true if the device's runtime PM status is 'suspended' and its |
383 | otherwise | 383 | 'power.disable_depth' field is equal to zero, or false otherwise |
384 | 384 | ||
385 | void pm_runtime_allow(struct device *dev); | 385 | void pm_runtime_allow(struct device *dev); |
386 | - set the power.runtime_auto flag for the device and decrease its usage | 386 | - set the power.runtime_auto flag for the device and decrease its usage |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 3ec2358f8692..d19f1cca7f74 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -77,7 +77,8 @@ static inline void device_set_run_wake(struct device *dev, bool enable) | |||
77 | 77 | ||
78 | static inline bool pm_runtime_suspended(struct device *dev) | 78 | static inline bool pm_runtime_suspended(struct device *dev) |
79 | { | 79 | { |
80 | return dev->power.runtime_status == RPM_SUSPENDED; | 80 | return dev->power.runtime_status == RPM_SUSPENDED |
81 | && !dev->power.disable_depth; | ||
81 | } | 82 | } |
82 | 83 | ||
83 | static inline void pm_runtime_mark_last_busy(struct device *dev) | 84 | static inline void pm_runtime_mark_last_busy(struct device *dev) |
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index baf667bb2794..8c7e4832b9be 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | #include "power.h" | 31 | #include "power.h" |
32 | 32 | ||
33 | #define HIBERNATE_SIG "LINHIB0001" | 33 | #define HIBERNATE_SIG "S1SUSPEND" |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * The swap map is a data structure used for keeping track of each page | 36 | * The swap map is a data structure used for keeping track of each page |
diff --git a/kernel/power/user.c b/kernel/power/user.c index 1b2ea31e6bd8..c36c3b9e8a84 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c | |||
@@ -137,7 +137,7 @@ static int snapshot_release(struct inode *inode, struct file *filp) | |||
137 | free_all_swap_pages(data->swap); | 137 | free_all_swap_pages(data->swap); |
138 | if (data->frozen) | 138 | if (data->frozen) |
139 | thaw_processes(); | 139 | thaw_processes(); |
140 | pm_notifier_call_chain(data->mode == O_WRONLY ? | 140 | pm_notifier_call_chain(data->mode == O_RDONLY ? |
141 | PM_POST_HIBERNATION : PM_POST_RESTORE); | 141 | PM_POST_HIBERNATION : PM_POST_RESTORE); |
142 | atomic_inc(&snapshot_device_available); | 142 | atomic_inc(&snapshot_device_available); |
143 | 143 | ||