]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
PM: device_suspend/resume may sleep
authorPavel Machek <pavel@suse.cz>
Fri, 1 Sep 2006 05:02:11 +0000 (22:02 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 26 Sep 2006 04:08:38 +0000 (21:08 -0700)
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>
drivers/base/power/resume.c
drivers/base/power/suspend.c

index 48e3d49d7b65351da96b950ed5111b0617aa48a3..7cb62d62c958957bd6c88b2c0783ef9681712670 100644 (file)
@@ -96,6 +96,7 @@ void dpm_resume(void)
 
 void device_resume(void)
 {
+       might_sleep();
        down(&dpm_sem);
        dpm_resume();
        up(&dpm_sem);
index 6453c25103d236ad55acf08c6cd9c31ae40fb38b..ece136bf97e35d2921b9ac8b1576eb32d53e7252 100644 (file)
@@ -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) {