diff options
author | Pavel Machek <pavel@suse.cz> | 2006-08-31 22:02:11 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-25 21:08:38 -0700 |
commit | bb84c89f94851161f387285d0a449b4a3f29f4df (patch) | |
tree | 6cda3e7cbfc57956f732de8f9c619625bcbba8ea /drivers/base | |
parent | 84ed64ee8f7dfd89f59857124dbeb8a350c6e03d (diff) | |
download | kernel_samsung_espresso10-bb84c89f94851161f387285d0a449b4a3f29f4df.zip kernel_samsung_espresso10-bb84c89f94851161f387285d0a449b4a3f29f4df.tar.gz kernel_samsung_espresso10-bb84c89f94851161f387285d0a449b4a3f29f4df.tar.bz2 |
PM: device_suspend/resume may sleep
This adds warning when someone tries them from atomic context.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-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 48e3d49..7cb62d6 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 6453c25..ece136b 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) { |