Skip to content

Commit

Permalink
PCI: pci_has_legacy_pm_support add driver and device to WARN
Browse files Browse the repository at this point in the history
Include the driver name and device in warning when a pci driver
supports both legacy pm and new framework as just the stack trace
gives no way to identify the driver.

Signed-off-by: David Fries <[email protected]>
Acked-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Jesse Barnes <[email protected]>
  • Loading branch information
dfries authored and jbarnes993 committed Jan 6, 2012
1 parent d5dea7d commit 82440a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/pci/pci-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,8 @@ static bool pci_has_legacy_pm_support(struct pci_dev *pci_dev)
* supported as well. Drivers are supposed to support either the
* former, or the latter, but not both at the same time.
*/
WARN_ON(ret && drv->driver.pm);
WARN(ret && drv->driver.pm, "driver %s device %04x:%04x\n",
drv->name, pci_dev->vendor, pci_dev->device);

return ret;
}
Expand Down

0 comments on commit 82440a8

Please sign in to comment.