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

Commit e3b439e1 authored by Yinghai Lu's avatar Yinghai Lu Committed by Bjorn Helgaas
Browse files

PCI: Use device_release_driver() in pci_stop_root_bus()



To be consistent with 4bff6749 ("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: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent c4a0a5d9
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -128,7 +128,7 @@ void pci_stop_root_bus(struct pci_bus *bus)
		pci_stop_bus_device(child);
		pci_stop_bus_device(child);


	/* stop the host bridge */
	/* stop the host bridge */
	device_del(&host_bridge->dev);
	device_release_driver(&host_bridge->dev);
}
}


void pci_remove_root_bus(struct pci_bus *bus)
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;
	host_bridge->bus = NULL;


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