diff options
author | Johannes Berg <johannes.berg@intel.com> | 2018-09-25 14:17:56 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-09-25 14:27:24 +0200 |
commit | 484f9e4d5f506237612f4e51ad5fe6660878ca63 (patch) | |
tree | b92e007732d9ddc53040d31decda8a802a32263c | |
parent | 6a4f9f9377d15939f03eafed99e85cc5bc867c8f (diff) |
backports: add pm_runtime_force_suspend/pm_runtime_force_resume
We can't really backport those, but add them anyway for compilation,
perhaps somebody doesn't want to suspend/resume?
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | backport/backport-include/linux/pm_runtime.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/backport/backport-include/linux/pm_runtime.h b/backport/backport-include/linux/pm_runtime.h index d9163eea..e16cd30b 100644 --- a/backport/backport-include/linux/pm_runtime.h +++ b/backport/backport-include/linux/pm_runtime.h @@ -16,4 +16,25 @@ static inline bool pm_runtime_active(struct device *dev) { return true; } #endif /* LINUX_VERSION_IS_LESS(3,9,0) */ +#if LINUX_VERSION_IS_LESS(3,15,0) +static inline int pm_runtime_force_suspend(struct device *dev) +{ +#ifdef CONFIG_PM + /* cannot backport properly, I think */ + WARN_ON_ONCE(1); + return -EINVAL; +#endif + return 0; +} +static inline int pm_runtime_force_resume(struct device *dev) +{ +#ifdef CONFIG_PM + /* cannot backport properly, I think */ + WARN_ON_ONCE(1); + return -EINVAL; +#endif + return 0; +} +#endif + #endif /* __BACKPORT_PM_RUNTIME_H */ |