[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <11592491611339-git-send-email-greg@kroah.com>
Date: Mon, 25 Sep 2006 22:37:44 -0700
From: Greg KH <greg@...ah.com>
To: linux-kernel@...r.kernel.org
Cc: Pavel Machek <pavel@...e.cz>, Andrew Morton <akpm@...l.org>,
Greg Kroah-Hartman <gregkh@...e.de>
Subject: [PATCH 24/47] PM: device_suspend/resume may sleep
From: Pavel Machek <pavel@...e.cz>
This adds warning when someone tries them from atomic context.
Signed-off-by: Pavel Machek <pavel@...e.cz>
Signed-off-by: Andrew Morton <akpm@...l.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
drivers/base/power/resume.c | 1 +
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) {
--
1.4.2.1
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists