Btrfs: don't walk around with task->state != TASK_RUNNING
[deliverable/linux.git] / include / linux / pm_runtime.h
index 7d773aac5314765f131fd5f108a55f800ee3e589..b776db737244a114a8cbd257a255404b15e53155 100644 (file)
@@ -62,6 +62,11 @@ static inline void device_set_run_wake(struct device *dev, bool enable)
        dev->power.run_wake = enable;
 }
 
+static inline bool pm_runtime_suspended(struct device *dev)
+{
+       return dev->power.runtime_status == RPM_SUSPENDED;
+}
+
 #else /* !CONFIG_PM_RUNTIME */
 
 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) {}
 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) {}
+static inline bool pm_runtime_suspended(struct device *dev) { return false; }
 
 #endif /* !CONFIG_PM_RUNTIME */
 
This page took 0.025956 seconds and 5 git commands to generate.