diff options
Diffstat (limited to 'kernel/power/main.c')
-rw-r--r-- | kernel/power/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c index e1c41312046..a064dfd8877 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c @@ -167,7 +167,10 @@ static inline int valid_state(suspend_state_t state) if (state == PM_SUSPEND_DISK) return 1; - if (pm_ops && pm_ops->valid && !pm_ops->valid(state)) + /* all other states need lowlevel support and need to be + * valid to the lowlevel implementation, no valid callback + * implies that all are valid. */ + if (!pm_ops || (pm_ops->valid && !pm_ops->valid(state))) return 0; return 1; } |