aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/remove.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2013-11-30 17:40:27 -0500
committerBjorn Helgaas <bhelgaas@google.com>2013-12-18 15:53:36 -0500
commite3b439e1d315aff59c1b4f0fc43c5cd2d82b4138 (patch)
tree485ec3ecc6cf1a79a368c446cbe86fe86cf853b7 /drivers/pci/remove.c
parentc4a0a5d964e90b93eb4101c3927b788e083e530f (diff)
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 <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/pci/remove.c')
-rw-r--r--drivers/pci/remove.c4
1 files changed, 2 insertions, 2 deletions
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)
128 pci_stop_bus_device(child); 128 pci_stop_bus_device(child);
129 129
130 /* stop the host bridge */ 130 /* stop the host bridge */
131 device_del(&host_bridge->dev); 131 device_release_driver(&host_bridge->dev);
132} 132}
133 133
134void pci_remove_root_bus(struct pci_bus *bus) 134void pci_remove_root_bus(struct pci_bus *bus)
@@ -147,5 +147,5 @@ void pci_remove_root_bus(struct pci_bus *bus)
147 host_bridge->bus = NULL; 147 host_bridge->bus = NULL;
148 148
149 /* remove the host bridge */ 149 /* remove the host bridge */
150 put_device(&host_bridge->dev); 150 device_unregister(&host_bridge->dev);
151} 151}