diff --git a/drivers/base/power/resume.c b/drivers/base/power/resume.c index 48e3d49d7b65351da96b950ed5111b0617aa48a3..7cb62d62c958957bd6c88b2c0783ef9681712670 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 6453c25103d236ad55acf08c6cd9c31ae40fb38b..ece136bf97e35d2921b9ac8b1576eb32d53e7252 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) {