diff options
Diffstat (limited to 'kernel/power/main.c')
-rw-r--r-- | kernel/power/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c index 540b16b68565..19122cf6d827 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/kmod.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/console.h> | 19 | #include <linux/console.h> |
19 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
@@ -237,6 +238,10 @@ static int suspend_prepare(void) | |||
237 | if (error) | 238 | if (error) |
238 | goto Finish; | 239 | goto Finish; |
239 | 240 | ||
241 | error = usermodehelper_disable(); | ||
242 | if (error) | ||
243 | goto Finish; | ||
244 | |||
240 | if (suspend_freeze_processes()) { | 245 | if (suspend_freeze_processes()) { |
241 | error = -EAGAIN; | 246 | error = -EAGAIN; |
242 | goto Thaw; | 247 | goto Thaw; |
@@ -256,6 +261,7 @@ static int suspend_prepare(void) | |||
256 | 261 | ||
257 | Thaw: | 262 | Thaw: |
258 | suspend_thaw_processes(); | 263 | suspend_thaw_processes(); |
264 | usermodehelper_enable(); | ||
259 | Finish: | 265 | Finish: |
260 | pm_notifier_call_chain(PM_POST_SUSPEND); | 266 | pm_notifier_call_chain(PM_POST_SUSPEND); |
261 | pm_restore_console(); | 267 | pm_restore_console(); |
@@ -376,6 +382,7 @@ int suspend_devices_and_enter(suspend_state_t state) | |||
376 | static void suspend_finish(void) | 382 | static void suspend_finish(void) |
377 | { | 383 | { |
378 | suspend_thaw_processes(); | 384 | suspend_thaw_processes(); |
385 | usermodehelper_enable(); | ||
379 | pm_notifier_call_chain(PM_POST_SUSPEND); | 386 | pm_notifier_call_chain(PM_POST_SUSPEND); |
380 | pm_restore_console(); | 387 | pm_restore_console(); |
381 | } | 388 | } |