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

Commit 46fbade0 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Jesse Barnes
Browse files

x86/PCI: use pci_scan_bus() instead of pci_scan_bus_parented()



This doesn't change any functionality, but it makes a subsequent patch
slightly simpler.

pci_scan_bus(NULL, ...) and pci_scan_bus_parented() are identical except
that pci_scan_bus() also calls pci_bus_add_devices():

  pci_scan_bus_parented
    pci_create_bus
    pci_scan_child_bus

  pci_scan_bus
    pci_create_bus
    pci_scan_child_bus
    pci_bus_add_devices

All callers of pcibios_scan_root() call pci_bus_add_devices() explicitly,
and we don't pass a parent device, so we might as well use pci_scan_bus().

Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 6361d72b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -456,7 +456,7 @@ struct pci_bus * __devinit pcibios_scan_root(int busnum)
	sd->node = get_mp_bus_to_node(busnum);

	printk(KERN_DEBUG "PCI: Probing PCI hardware (bus %02x)\n", busnum);
	bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd);
	bus = pci_scan_bus(busnum, &pci_root_ops, sd);
	if (!bus)
		kfree(sd);

+0 −3
Original line number Diff line number Diff line
@@ -31,9 +31,6 @@ int __init pci_legacy_init(void)

	printk("PCI: Probing PCI hardware\n");
	pci_root_bus = pcibios_scan_root(0);
	if (pci_root_bus)
		pci_bus_add_devices(pci_root_bus);

	return 0;
}

+0 −2
Original line number Diff line number Diff line
@@ -153,8 +153,6 @@ int __init pci_numaq_init(void)
	raw_pci_ops = &pci_direct_conf1_mq;

	pci_root_bus = pcibios_scan_root(0);
	if (pci_root_bus)
		pci_bus_add_devices(pci_root_bus);
	if (num_online_nodes() > 1)
		for_each_online_node(quad) {
			if (quad == 0)