PCI: remove unused resource assignment in pci_read_bridge_bases()
authorZhao, Yu <yu.zhao@intel.com>
Mon, 13 Oct 2008 13:02:27 +0000 (21:02 +0800)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 23 Oct 2008 23:17:47 +0000 (16:17 -0700)
This cleanup removes the resource assignment in pci_read_bridge_bases()
since it has taken care by pci_alloc_child_bus() when allocating the bus:

        /* Set up default resource pointers and names.. */
        for (i = 0; i < PCI_BRIDGE_RES_NUM; i++) {
                child->resource[i] = &bridge->resource[PCI_BRIDGE_RESOURCES+i];
                child->resource[i]->name = child->name;
        }

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/probe.c

index 6f1e51d77bce010b53ec7a4f55069fe6302ebf78..003a9b3c293fd6937682d061f2b4e242ab673adc 100644 (file)
@@ -298,9 +298,6 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
                        child->resource[i] = child->parent->resource[i - 3];
        }
 
-       for(i=0; i<3; i++)
-               child->resource[i] = &dev->resource[PCI_BRIDGE_RESOURCES+i];
-
        res = child->resource[0];
        pci_read_config_byte(dev, PCI_IO_BASE, &io_base_lo);
        pci_read_config_byte(dev, PCI_IO_LIMIT, &io_limit_lo);