diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
| commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
| tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /drivers/base/power | |
| parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
| parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) | |
Merge branch 'linus'
Diffstat (limited to 'drivers/base/power')
| -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) { |
