diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2010-04-29 19:53:17 -0400 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2010-04-29 19:53:17 -0400 |
| commit | d9c5841e22231e4e49fd0a1004164e6fce59b7a6 (patch) | |
| tree | e1f589c46b3ff79bbe7b1b2469f6362f94576da6 /include/linux/pm_runtime.h | |
| parent | b701a47ba48b698976fb2fe05fb285b0edc1d26a (diff) | |
| parent | 5967ed87ade85a421ef814296c3c7f182b08c225 (diff) | |
Merge branch 'x86/asm' into x86/atomic
Merge reason:
Conflict between LOCK_PREFIX_HERE and relative alternatives
pointers
Resolved Conflicts:
arch/x86/include/asm/alternative.h
arch/x86/kernel/alternative.c
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'include/linux/pm_runtime.h')
| -rw-r--r-- | include/linux/pm_runtime.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 370ce0a6fe4a..b776db737244 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
| @@ -28,6 +28,8 @@ extern int __pm_runtime_set_status(struct device *dev, unsigned int status); | |||
| 28 | extern int pm_runtime_barrier(struct device *dev); | 28 | extern int pm_runtime_barrier(struct device *dev); |
| 29 | extern void pm_runtime_enable(struct device *dev); | 29 | extern void pm_runtime_enable(struct device *dev); |
| 30 | extern void __pm_runtime_disable(struct device *dev, bool check_resume); | 30 | extern void __pm_runtime_disable(struct device *dev, bool check_resume); |
| 31 | extern void pm_runtime_allow(struct device *dev); | ||
| 32 | extern void pm_runtime_forbid(struct device *dev); | ||
| 31 | 33 | ||
| 32 | static inline bool pm_children_suspended(struct device *dev) | 34 | static inline bool pm_children_suspended(struct device *dev) |
| 33 | { | 35 | { |
| @@ -60,6 +62,11 @@ static inline void device_set_run_wake(struct device *dev, bool enable) | |||
| 60 | dev->power.run_wake = enable; | 62 | dev->power.run_wake = enable; |
| 61 | } | 63 | } |
| 62 | 64 | ||
| 65 | static inline bool pm_runtime_suspended(struct device *dev) | ||
| 66 | { | ||
| 67 | return dev->power.runtime_status == RPM_SUSPENDED; | ||
| 68 | } | ||
| 69 | |||
| 63 | #else /* !CONFIG_PM_RUNTIME */ | 70 | #else /* !CONFIG_PM_RUNTIME */ |
| 64 | 71 | ||
| 65 | static inline int pm_runtime_idle(struct device *dev) { return -ENOSYS; } | 72 | static inline int pm_runtime_idle(struct device *dev) { return -ENOSYS; } |
| @@ -78,6 +85,8 @@ static inline int __pm_runtime_set_status(struct device *dev, | |||
| 78 | static inline int pm_runtime_barrier(struct device *dev) { return 0; } | 85 | static inline int pm_runtime_barrier(struct device *dev) { return 0; } |
| 79 | static inline void pm_runtime_enable(struct device *dev) {} | 86 | static inline void pm_runtime_enable(struct device *dev) {} |
| 80 | static inline void __pm_runtime_disable(struct device *dev, bool c) {} | 87 | static inline void __pm_runtime_disable(struct device *dev, bool c) {} |
| 88 | static inline void pm_runtime_allow(struct device *dev) {} | ||
| 89 | static inline void pm_runtime_forbid(struct device *dev) {} | ||
| 81 | 90 | ||
| 82 | static inline bool pm_children_suspended(struct device *dev) { return false; } | 91 | static inline bool pm_children_suspended(struct device *dev) { return false; } |
| 83 | static inline void pm_suspend_ignore_children(struct device *dev, bool en) {} | 92 | static inline void pm_suspend_ignore_children(struct device *dev, bool en) {} |
| @@ -85,6 +94,7 @@ static inline void pm_runtime_get_noresume(struct device *dev) {} | |||
| 85 | static inline void pm_runtime_put_noidle(struct device *dev) {} | 94 | static inline void pm_runtime_put_noidle(struct device *dev) {} |
| 86 | static inline bool device_run_wake(struct device *dev) { return false; } | 95 | static inline bool device_run_wake(struct device *dev) { return false; } |
| 87 | static inline void device_set_run_wake(struct device *dev, bool enable) {} | 96 | static inline void device_set_run_wake(struct device *dev, bool enable) {} |
| 97 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } | ||
| 88 | 98 | ||
| 89 | #endif /* !CONFIG_PM_RUNTIME */ | 99 | #endif /* !CONFIG_PM_RUNTIME */ |
| 90 | 100 | ||
