Commit 5abd9356 authored by Mark Brown's avatar Mark Brown Committed by Greg Kroah-Hartman

driver core: Display error codes when class suspend fails

Aid diagnostics by printing the error code from failed suspends, which
doesn't otherwise seem to get displayed.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 07681215
...@@ -432,13 +432,13 @@ int sysdev_suspend(pm_message_t state) ...@@ -432,13 +432,13 @@ int sysdev_suspend(pm_message_t state)
/* resume current sysdev */ /* resume current sysdev */
cls_driver: cls_driver:
drv = NULL; drv = NULL;
printk(KERN_ERR "Class suspend failed for %s\n", printk(KERN_ERR "Class suspend failed for %s: %d\n",
kobject_name(&sysdev->kobj)); kobject_name(&sysdev->kobj), ret);
aux_driver: aux_driver:
if (drv) if (drv)
printk(KERN_ERR "Class driver suspend failed for %s\n", printk(KERN_ERR "Class driver suspend failed for %s: %d\n",
kobject_name(&sysdev->kobj)); kobject_name(&sysdev->kobj), ret);
list_for_each_entry(err_drv, &cls->drivers, entry) { list_for_each_entry(err_drv, &cls->drivers, entry) {
if (err_drv == drv) if (err_drv == drv)
break; break;
......
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