aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power/suspend.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@suse.cz>2006-09-01 01:02:11 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 00:08:38 -0400
commitbb84c89f94851161f387285d0a449b4a3f29f4df (patch)
tree6cda3e7cbfc57956f732de8f9c619625bcbba8ea /drivers/base/power/suspend.c
parent84ed64ee8f7dfd89f59857124dbeb8a350c6e03d (diff)
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/power/suspend.c')
-rw-r--r--drivers/base/power/suspend.c1
1 files changed, 1 insertions, 0 deletions
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)
140{ 140{
141 int error = 0; 141 int error = 0;
142 142
143 might_sleep();
143 down(&dpm_sem); 144 down(&dpm_sem);
144 down(&dpm_list_sem); 145 down(&dpm_list_sem);
145 while (!list_empty(&dpm_active) && error == 0) { 146 while (!list_empty(&dpm_active) && error == 0) {