Commit 5ca5b409 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] Report which device failed to suspend

Based on a patch from Nickolai Zeldovich <kolya@MIT.EDU> but put into the
proper place by me.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent b8ff3f6b
......@@ -39,6 +39,8 @@ int suspend_device(struct device * dev, u32 state)
{
int error = 0;
dev_dbg(dev, "suspending\n");
if (dev->bus && dev->bus->suspend && !dev->power.power_state)
error = dev->bus->suspend(dev,state);
......@@ -82,8 +84,11 @@ int device_suspend(u32 state)
} else if (error == -EAGAIN) {
list_del(&dev->power.entry);
list_add(&dev->power.entry,&dpm_off_irq);
} else
} else {
printk(KERN_ERR "Could not suspend device %s: "
"error %d\n", kobject_name(&dev->kobj), error);
goto Error;
}
}
Done:
up(&dpm_sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment