aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/main.c')
-rw-r--r--kernel/power/main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 053c0a7d7f57..f94f4e20115a 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -48,6 +48,19 @@ void pm_set_ops(struct pm_ops * ops)
48 mutex_unlock(&pm_mutex); 48 mutex_unlock(&pm_mutex);
49} 49}
50 50
51/**
52 * pm_valid_only_mem - generic memory-only valid callback
53 *
54 * pm_ops drivers that implement mem suspend only and only need
55 * to check for that in their .valid callback can use this instead
56 * of rolling their own .valid callback.
57 */
58int pm_valid_only_mem(suspend_state_t state)
59{
60 return state == PM_SUSPEND_MEM;
61}
62
63
51static inline void pm_finish(suspend_state_t state) 64static inline void pm_finish(suspend_state_t state)
52{ 65{
53 if (pm_ops->finish) 66 if (pm_ops->finish)