From 484f9e4d5f506237612f4e51ad5fe6660878ca63 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 25 Sep 2018 14:17:56 +0200 Subject: 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 --- backport/backport-include/linux/pm_runtime.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 */ -- cgit v1.2.3