提交 bb84c89f 编写于 作者: P Pavel Machek 提交者: Greg Kroah-Hartman

PM: device_suspend/resume may sleep

This adds warning when someone tries them from atomic context.
Signed-off-by: NPavel Machek <pavel@suse.cz>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 84ed64ee
......@@ -96,6 +96,7 @@ void dpm_resume(void)
void device_resume(void)
{
might_sleep();
down(&dpm_sem);
dpm_resume();
up(&dpm_sem);
......
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册