[PATCH] PCI: Fixup PCI driver shutdown
authorRussell King <rmk+lkml@arm.linux.org.uk>
Sun, 16 Oct 2005 20:31:36 +0000 (21:31 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 22:37:01 +0000 (15:37 -0700)
Add a warning to pci driver registration code so that we know
whether we have drivers using the obsolete driver shutdown
method.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/pci-driver.c

index 0d0d533894e0737694f01d16dae1b441b95d5247..f906f1a8fe6a94da1a471769f652b147557ee829 100644 (file)
@@ -377,6 +377,10 @@ int pci_register_driver(struct pci_driver *drv)
         * the pci shutdown function, this test can go away. */
        if (!drv->driver.shutdown)
                drv->driver.shutdown = pci_device_shutdown;
+       else
+               printk(KERN_WARNING "Warning: PCI driver %s has a struct "
+                       "device_driver shutdown method, please update!\n",
+                       drv->name);
        drv->driver.owner = drv->owner;
        drv->driver.kobj.ktype = &pci_driver_kobj_type;