summaryrefslogtreecommitdiff
path: root/include/linux/pm.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2014-04-03 09:26:49 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-04-03 09:26:49 -0700
commit692d96552c9a86a919fe6b5b82288a6c77c015a5 (patch)
treea9e49c040d361ea2293a8966832378def5a06714 /include/linux/pm.h
parente4dbedc7eac7da9db363a36f2bd4366962eeefcc (diff)
parente2c3ecf0ea8e87c5209371af7da107ebc47a5639 (diff)
downloadlinux-next-692d96552c9a86a919fe6b5b82288a6c77c015a5.tar.gz
linux-next-692d96552c9a86a919fe6b5b82288a6c77c015a5.zip
Merge branch 'next' into for-linus
First round of input updates for 3.15.
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r--include/linux/pm.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h
index a224c7f5c377..8c6583a53a06 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -311,6 +311,18 @@ struct dev_pm_ops {
#define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)
#endif
+#ifdef CONFIG_PM_SLEEP
+#define SET_LATE_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
+ .suspend_late = suspend_fn, \
+ .resume_early = resume_fn, \
+ .freeze_late = suspend_fn, \
+ .thaw_early = resume_fn, \
+ .poweroff_late = suspend_fn, \
+ .restore_early = resume_fn,
+#else
+#define SET_LATE_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)
+#endif
+
#ifdef CONFIG_PM_RUNTIME
#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
.runtime_suspend = suspend_fn, \
@@ -320,6 +332,15 @@ struct dev_pm_ops {
#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn)
#endif
+#ifdef CONFIG_PM
+#define SET_PM_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
+ .runtime_suspend = suspend_fn, \
+ .runtime_resume = resume_fn, \
+ .runtime_idle = idle_fn,
+#else
+#define SET_PM_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn)
+#endif
+
/*
* Use this if you want to use the same suspend and resume callbacks for suspend
* to RAM and hibernation.