diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2006-03-23 17:06:08 +0000 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2006-03-23 17:06:08 +0000 |
| commit | 92fe7b9ea8ef101bff3c75ade89b93b5f62a7955 (patch) | |
| tree | 3dba4faa78f1bbe4be503275173e3a63b5d60f22 /drivers/base/power/suspend.c | |
| parent | e750d1c7cc314b9ba1934b0b474b7d39f906f865 (diff) | |
| parent | b0e6e962992b76580f4900b166a337bad7c1e81b (diff) | |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'drivers/base/power/suspend.c')
| -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 @@ * */ +#include <linux/vt_kern.h> #include <linux/device.h> #include "../base.h" #include "power.h" @@ -62,7 +63,6 @@ int suspend_device(struct device * dev, pm_message_t state) return error; } - /** * device_suspend - Save state and stop all devices in system. * @state: Power state to put each device in. @@ -82,6 +82,9 @@ int device_suspend(pm_message_t state) { int error = 0; + if (!is_console_suspend_safe()) + return -EINVAL; + down(&dpm_sem); down(&dpm_list_sem); while (!list_empty(&dpm_active) && error == 0) { |
