Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 794f5bfa authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds
Browse files

[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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent caf2857a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -393,6 +393,9 @@ int pci_register_driver(struct pci_driver *drv)
	drv->driver.bus = &pci_bus_type;
	drv->driver.probe = pci_device_probe;
	drv->driver.remove = pci_device_remove;
	/* FIXME, once all of the existing PCI drivers have been fixed to set
	 * the pci shutdown function, this test can go away. */
	if (!drv->driver.shutdown)
		drv->driver.shutdown = pci_device_shutdown,
	drv->driver.owner = drv->owner;
	drv->driver.kobj.ktype = &pci_driver_kobj_type;