]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PCI: pci_has_legacy_pm_support add driver and device to WARN
authorDavid Fries <David@Fries.net>
Sun, 20 Nov 2011 21:29:46 +0000 (15:29 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 6 Dec 2011 17:26:06 +0000 (09:26 -0800)
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 <David@Fries.net>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pci-driver.c

index 12d1e81a8abecd2fc1a6bc7ab3946d53df05542a..3623d65f8b86ccb9d786085ec57592d2e890292c 100644 (file)
@@ -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;
 }