From: Russell King Date: Sun, 16 Oct 2005 20:31:36 +0000 (+0100) Subject: [PATCH] PCI: Fixup PCI driver shutdown X-Git-Tag: v2.6.15-rc1~731^2~22^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1720fdbd0f90e64668a59a304d01c5ba001b450;p=linux-2.6 [PATCH] PCI: Fixup PCI driver shutdown 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 0d0d533894..f906f1a8fe 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -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;