Skip to content

Commit

Permalink
PCI: Use device_release_driver() in pci_stop_root_bus()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yinghai Lu authored and Bjorn Helgaas committed Dec 18, 2013
1 parent c4a0a5d commit e3b439e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/remove.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
}

0 comments on commit e3b439e

Please sign in to comment.