From e3b439e1d315aff59c1b4f0fc43c5cd2d82b4138 Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Sat, 30 Nov 2013 14:40:27 -0800 Subject: PCI: Use device_release_driver() in pci_stop_root_bus() To be consistent with 4bff6749905d ("PCI: Move device_del() from pci_stop_dev() to pci_destroy_dev()", this changes pci_stop_root_bus() to use device_release_driver() instead of device_del(). This also changes pci_remove_root_bus() to use device_unregister() instead of put_device() so it corresponds with the device_register() call in pci_create_root_bus(). [bhelgaas: changelog] Signed-off-by: Yinghai Lu Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki --- drivers/pci/remove.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/pci/remove.c') diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index cc9337a71529..692f4c39ac48 100644 --- a/drivers/pci/remove.c +++ b/drivers/pci/remove.c @@ -128,7 +128,7 @@ void pci_stop_root_bus(struct pci_bus *bus) pci_stop_bus_device(child); /* stop the host bridge */ - device_del(&host_bridge->dev); + device_release_driver(&host_bridge->dev); } void pci_remove_root_bus(struct pci_bus *bus) @@ -147,5 +147,5 @@ void pci_remove_root_bus(struct pci_bus *bus) host_bridge->bus = NULL; /* remove the host bridge */ - put_device(&host_bridge->dev); + device_unregister(&host_bridge->dev); } -- cgit v1.2.3