Skip to contentSkip to conversation

driver core: Display error codes when class suspend fails

PATCH New Mark Brown 1 participant 1 message Oct 20, 2010 Driver core

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/base/sys.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/base/sys.c +4 -4
index 9354dc1..1667aaf 100644
@@ -432,13 +432,13 @@ int sysdev_suspend(pm_message_t state)
 	/* resume current sysdev */
 cls_driver:
 	drv = NULL;
-	printk(KERN_ERR "Class suspend failed for %s\n",
-		kobject_name(&sysdev->kobj));
+	printk(KERN_ERR "Class suspend failed for %s: %d\n",
+		kobject_name(&sysdev->kobj), ret);
 
 aux_driver:
 	if (drv)
-		printk(KERN_ERR "Class driver suspend failed for %s\n",
-				kobject_name(&sysdev->kobj));
+		printk(KERN_ERR "Class driver suspend failed for %s: %d\n",
+				kobject_name(&sysdev->kobj), ret);
 	list_for_each_entry(err_drv, &cls->drivers, entry) {
 		if (err_drv == drv)
 			break;
Signature · 1 line
1.7.1