diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/suspend.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c index 8660779fb288..bdb60663f2ef 100644 --- a/drivers/base/power/suspend.c +++ b/drivers/base/power/suspend.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/vt_kern.h> | ||
11 | #include <linux/device.h> | 12 | #include <linux/device.h> |
12 | #include "../base.h" | 13 | #include "../base.h" |
13 | #include "power.h" | 14 | #include "power.h" |
@@ -62,7 +63,6 @@ int suspend_device(struct device * dev, pm_message_t state) | |||
62 | return error; | 63 | return error; |
63 | } | 64 | } |
64 | 65 | ||
65 | |||
66 | /** | 66 | /** |
67 | * device_suspend - Save state and stop all devices in system. | 67 | * device_suspend - Save state and stop all devices in system. |
68 | * @state: Power state to put each device in. | 68 | * @state: Power state to put each device in. |
@@ -82,6 +82,9 @@ int device_suspend(pm_message_t state) | |||
82 | { | 82 | { |
83 | int error = 0; | 83 | int error = 0; |
84 | 84 | ||
85 | if (!is_console_suspend_safe()) | ||
86 | return -EINVAL; | ||
87 | |||
85 | down(&dpm_sem); | 88 | down(&dpm_sem); |
86 | down(&dpm_list_sem); | 89 | down(&dpm_list_sem); |
87 | while (!list_empty(&dpm_active) && error == 0) { | 90 | while (!list_empty(&dpm_active) && error == 0) { |