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
This commit is contained in:
commit
508817e7cd
|
@ -379,8 +379,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
|
||||||
zero)
|
zero)
|
||||||
|
|
||||||
bool pm_runtime_suspended(struct device *dev);
|
bool pm_runtime_suspended(struct device *dev);
|
||||||
- return true if the device's runtime PM status is 'suspended', or false
|
- return true if the device's runtime PM status is 'suspended' and its
|
||||||
otherwise
|
'power.disable_depth' field is equal to zero, or false otherwise
|
||||||
|
|
||||||
void pm_runtime_allow(struct device *dev);
|
void pm_runtime_allow(struct device *dev);
|
||||||
- set the power.runtime_auto flag for the device and decrease its usage
|
- set the power.runtime_auto flag for the device and decrease its usage
|
||||||
|
|
|
@ -77,7 +77,8 @@ static inline void device_set_run_wake(struct device *dev, bool enable)
|
||||||
|
|
||||||
static inline bool pm_runtime_suspended(struct device *dev)
|
static inline bool pm_runtime_suspended(struct device *dev)
|
||||||
{
|
{
|
||||||
return dev->power.runtime_status == RPM_SUSPENDED;
|
return dev->power.runtime_status == RPM_SUSPENDED
|
||||||
|
&& !dev->power.disable_depth;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void pm_runtime_mark_last_busy(struct device *dev)
|
static inline void pm_runtime_mark_last_busy(struct device *dev)
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
|
|
||||||
#define HIBERNATE_SIG "LINHIB0001"
|
#define HIBERNATE_SIG "S1SUSPEND"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The swap map is a data structure used for keeping track of each page
|
* The swap map is a data structure used for keeping track of each page
|
||||||
|
|
|
@ -137,7 +137,7 @@ static int snapshot_release(struct inode *inode, struct file *filp)
|
||||||
free_all_swap_pages(data->swap);
|
free_all_swap_pages(data->swap);
|
||||||
if (data->frozen)
|
if (data->frozen)
|
||||||
thaw_processes();
|
thaw_processes();
|
||||||
pm_notifier_call_chain(data->mode == O_WRONLY ?
|
pm_notifier_call_chain(data->mode == O_RDONLY ?
|
||||||
PM_POST_HIBERNATION : PM_POST_RESTORE);
|
PM_POST_HIBERNATION : PM_POST_RESTORE);
|
||||||
atomic_inc(&snapshot_device_available);
|
atomic_inc(&snapshot_device_available);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue