diff options
-rw-r--r-- | drivers/base/power/resume.c | 1 | ||||
-rw-r--r-- | drivers/base/power/suspend.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/power/resume.c b/drivers/base/power/resume.c index 48e3d49d7b65..7cb62d62c958 100644 --- a/drivers/base/power/resume.c +++ b/drivers/base/power/resume.c @@ -96,6 +96,7 @@ void dpm_resume(void) void device_resume(void) { + might_sleep(); down(&dpm_sem); dpm_resume(); up(&dpm_sem); diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c index 6453c25103d2..ece136bf97e3 100644 --- a/drivers/base/power/suspend.c +++ b/drivers/base/power/suspend.c @@ -140,6 +140,7 @@ int device_suspend(pm_message_t state) { int error = 0; + might_sleep(); down(&dpm_sem); down(&dpm_list_sem); while (!list_empty(&dpm_active) && error == 0) { |