Skip to content

Commit e3b439e

Browse files
Yinghai Lubjorn-helgaas
authored andcommitted
PCI: Use device_release_driver() in pci_stop_root_bus()
To be consistent with 4bff674 ("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>
1 parent c4a0a5d commit e3b439e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/remove.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void pci_stop_root_bus(struct pci_bus *bus)
128128
pci_stop_bus_device(child);
129129

130130
/* stop the host bridge */
131-
device_del(&host_bridge->dev);
131+
device_release_driver(&host_bridge->dev);
132132
}
133133

134134
void pci_remove_root_bus(struct pci_bus *bus)
@@ -147,5 +147,5 @@ void pci_remove_root_bus(struct pci_bus *bus)
147147
host_bridge->bus = NULL;
148148

149149
/* remove the host bridge */
150-
put_device(&host_bridge->dev);
150+
device_unregister(&host_bridge->dev);
151151
}

0 commit comments

Comments
 (0)