diff options
Diffstat (limited to 'include/linux/pm_runtime.h')
-rw-r--r-- | include/linux/pm_runtime.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 7d773aac5314..b776db737244 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -62,6 +62,11 @@ static inline void device_set_run_wake(struct device *dev, bool enable) | |||
62 | dev->power.run_wake = enable; | 62 | dev->power.run_wake = enable; |
63 | } | 63 | } |
64 | 64 | ||
65 | static inline bool pm_runtime_suspended(struct device *dev) | ||
66 | { | ||
67 | return dev->power.runtime_status == RPM_SUSPENDED; | ||
68 | } | ||
69 | |||
65 | #else /* !CONFIG_PM_RUNTIME */ | 70 | #else /* !CONFIG_PM_RUNTIME */ |
66 | 71 | ||
67 | static inline int pm_runtime_idle(struct device *dev) { return -ENOSYS; } | 72 | static inline int pm_runtime_idle(struct device *dev) { return -ENOSYS; } |
@@ -89,6 +94,7 @@ static inline void pm_runtime_get_noresume(struct device *dev) {} | |||
89 | static inline void pm_runtime_put_noidle(struct device *dev) {} | 94 | static inline void pm_runtime_put_noidle(struct device *dev) {} |
90 | static inline bool device_run_wake(struct device *dev) { return false; } | 95 | static inline bool device_run_wake(struct device *dev) { return false; } |
91 | 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; } | ||
92 | 98 | ||
93 | #endif /* !CONFIG_PM_RUNTIME */ | 99 | #endif /* !CONFIG_PM_RUNTIME */ |
94 | 100 | ||