summaryrefslogtreecommitdiff
path: root/include/linux/pm_runtime.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 19:07:16 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 19:07:16 +0300
commitdad3de7d0090280f44ff27131ed2878f1ab6ddad (patch)
treef887c721761ce845037d96b59542198294a5d3a5 /include/linux/pm_runtime.h
parented9216c1717a3f3738a77908aff78995ea69e7ff (diff)
parent7a1a8eb58a2c6cd819d17332c5a2c369203635d5 (diff)
downloadlinux-dad3de7d0090280f44ff27131ed2878f1ab6ddad.tar.xz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: PM: Add flag for devices capable of generating run-time wake-up events PM / Runtime: Remove unnecessary braces in __pm_runtime_set_status() PM / Runtime: Make documentation of runtime_idle() agree with the code PM / Runtime: Ensure timer_expires is nonzero in pm_schedule_suspend() PM / Runtime: Use deferred_resume flag in pm_request_resume PM / Runtime: Export the PM runtime workqueue PM / Runtime: Fix lockdep warning in __pm_runtime_set_status() PM / Hibernate: Swap, use KERN_CONT PM / Hibernate: Shift remaining code from swsusp.c to hibernate.c PM / Hibernate: Move swap functions to kernel/power/swap.c. PM / freezer: Don't get over-anxious while waiting
Diffstat (limited to 'include/linux/pm_runtime.h')
-rw-r--r--include/linux/pm_runtime.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 44087044910f..370ce0a6fe4a 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -50,6 +50,16 @@ static inline void pm_runtime_put_noidle(struct device *dev)
atomic_add_unless(&dev->power.usage_count, -1, 0);
}
+static inline bool device_run_wake(struct device *dev)
+{
+ return dev->power.run_wake;
+}
+
+static inline void device_set_run_wake(struct device *dev, bool enable)
+{
+ dev->power.run_wake = enable;
+}
+
#else /* !CONFIG_PM_RUNTIME */
static inline int pm_runtime_idle(struct device *dev) { return -ENOSYS; }
@@ -73,6 +83,8 @@ static inline bool pm_children_suspended(struct device *dev) { return false; }
static inline void pm_suspend_ignore_children(struct device *dev, bool en) {}
static inline void pm_runtime_get_noresume(struct device *dev) {}
static inline void pm_runtime_put_noidle(struct device *dev) {}
+static inline bool device_run_wake(struct device *dev) { return false; }
+static inline void device_set_run_wake(struct device *dev, bool enable) {}
#endif /* !CONFIG_PM_RUNTIME */