]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86/PCI: use pci_scan_bus() instead of pci_scan_bus_parented()
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 28 Oct 2011 22:28:08 +0000 (16:28 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 12 Dec 2011 20:53:01 +0000 (12:53 -0800)
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: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
arch/x86/pci/common.c
arch/x86/pci/legacy.c
arch/x86/pci/numaq_32.c

index 7962ccb4d9b26aeb3354d2ab1814d9d04a69d695..07c55ce6fdf5268a3a0366e819c452d6d634f27b 100644 (file)
@@ -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);
 
index 2c2aeabc2609bdd90fd78d1287d5648016a198d0..a1df191129d30154e3386dc46ba78e5b540bbb74 100644 (file)
@@ -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;
 }
 
index 51abf02f9226687c234945e1ff39fb9a8c13695b..83e125b95ca6d6502c9b6d12babbe5ea77a464d4 100644 (file)
@@ -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)