Skip to content

Commit

Permalink
driver core: Display error codes when class suspend fails
Browse files Browse the repository at this point in the history
Aid diagnostics by printing the error code from failed suspends, which
doesn't otherwise seem to get displayed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Mark Brown authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 0768121 commit 5abd935
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/base/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5abd935

Please sign in to comment.