public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] report which device failed to suspend
@ 2004-05-27 22:36 Nickolai Zeldovich
  2004-05-28 21:08 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Nickolai Zeldovich @ 2004-05-27 22:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds

When your machine stops suspending all of a sudden, a patch such as the
one below is helpful to diagnose which device or driver is misbehaving and
causing the suspend sequence to fail.

-- kolya

--- drivers/base/power/suspend.c	2004/05/27 22:09:47	1.1
+++ drivers/base/power/suspend.c	2004/05/27 22:28:36
@@ -42,6 +42,10 @@
 	if (dev->bus && dev->bus->suspend && !dev->power.power_state)
 		error = dev->bus->suspend(dev,state);

+	if (error)
+		printk(KERN_ERR "Could not suspend device %s: error %d\n",
+			kobject_name(&dev->kobj), error);
+
 	return error;
 }


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-28 21:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-27 22:36 [PATCH] report which device failed to suspend Nickolai Zeldovich
2004-05-28 21:08 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox