aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-06-17 15:25:25 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-17 15:34:20 -0400
commit794f5bfa77955c4455f6d72d8b0e2bee25f1ff0c (patch)
tree7a9ea02e064ed7089e3a8666161aca060359c971 /drivers/pci/pci-driver.c
parentcaf2857ac6e0ba2651e722f05d5f7d3ec8ef2615 (diff)
[PATCH] PCI: don't override drv->shutdown unconditionally
There are many drivers that have been setting the generic driver model level shutdown callback, and pci thus must not override it. Without this patch we can have really bad data loss on various raid controllers. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r--drivers/pci/pci-driver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index fe98553c978f..f315df2005bc 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -393,7 +393,10 @@ int pci_register_driver(struct pci_driver *drv)
393 drv->driver.bus = &pci_bus_type; 393 drv->driver.bus = &pci_bus_type;
394 drv->driver.probe = pci_device_probe; 394 drv->driver.probe = pci_device_probe;
395 drv->driver.remove = pci_device_remove; 395 drv->driver.remove = pci_device_remove;
396 drv->driver.shutdown = pci_device_shutdown, 396 /* FIXME, once all of the existing PCI drivers have been fixed to set
397 * the pci shutdown function, this test can go away. */
398 if (!drv->driver.shutdown)
399 drv->driver.shutdown = pci_device_shutdown,
397 drv->driver.owner = drv->owner; 400 drv->driver.owner = drv->owner;
398 drv->driver.kobj.ktype = &pci_driver_kobj_type; 401 drv->driver.kobj.ktype = &pci_driver_kobj_type;
399 pci_init_dynids(&drv->dynids); 402 pci_init_dynids(&drv->dynids);