* [PATCH] pm: clear -EAGAIN in dpm_prepare
@ 2009-06-30 14:50 Sebastian Ott
2009-07-04 23:47 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Ott @ 2009-06-30 14:50 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-pm
pm: clear -EAGAIN in dpm_prepare
When the last device in the dpm list is unregistered directly after its
prepare() callback returned with -EAGAIN, the return code is passed to
the calling function, resulting in a resume failure. Prevent this by
clearing the return code after -EAGAIN.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
---
drivers/base/power/main.c | 1 +
1 file changed, 1 insertion(+)
Index: git.linux-2.6/drivers/base/power/main.c
===================================================================
--- git.linux-2.6.orig/drivers/base/power/main.c 2009-06-30 12:27:33.000000000 +0200
+++ git.linux-2.6/drivers/base/power/main.c 2009-06-30 12:38:26.000000000 +0200
@@ -762,6 +762,7 @@ static int dpm_prepare(pm_message_t stat
dev->power.status = DPM_ON;
if (error == -EAGAIN) {
put_device(dev);
+ error = 0;
continue;
}
printk(KERN_ERR "PM: Failed to prepare device %s "
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] pm: clear -EAGAIN in dpm_prepare
2009-06-30 14:50 [PATCH] pm: clear -EAGAIN in dpm_prepare Sebastian Ott
@ 2009-07-04 23:47 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2009-07-04 23:47 UTC (permalink / raw)
To: Sebastian Ott; +Cc: linux-pm
On Tuesday 30 June 2009, Sebastian Ott wrote:
> pm: clear -EAGAIN in dpm_prepare
>
> When the last device in the dpm list is unregistered directly after its
> prepare() callback returned with -EAGAIN, the return code is passed to
> the calling function, resulting in a resume failure. Prevent this by
> clearing the return code after -EAGAIN.
>
> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
> ---
Thanks, the patch is now in the linux-next branch of the suspend-2.6 tree.
Best,
Rafael
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-04 23:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-30 14:50 [PATCH] pm: clear -EAGAIN in dpm_prepare Sebastian Ott
2009-07-04 23:47 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox