[PATCH] report which device failed to suspend

Nickolai Zeldovich
2004-05-27T22:36:22Z

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;
}