microblaze/PCI: fix pci_bus_for_each_resource() usage
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 28 Oct 2011 22:26:36 +0000 (16:26 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 6 Jan 2012 20:10:59 +0000 (12:10 -0800)
The pci_bus_for_each_resource() iterator sets "res" itself, so there's
no need to look it up in the bus->resource[] table.

Logically part of 89a74ecccd and 8a66da71fa.

CC: Michal Simek <monstr@monstr.eu>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
arch/microblaze/pci/pci-common.c

index 52b643d..a720f66 100644 (file)
@@ -1024,7 +1024,6 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
        struct pci_dev *dev = bus->self;
 
        pci_bus_for_each_resource(bus, res, i) {
-               res = bus->resource[i];
                if (!res)
                        continue;
                if (!res->flags)
@@ -1224,7 +1223,6 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
                 pci_domain_nr(bus), bus->number);
 
        pci_bus_for_each_resource(bus, res, i) {
-               res = bus->resource[i];
                if (!res || !res->flags
                    || res->start > res->end || res->parent)
                        continue;