Merge tag 'pci-v6.4-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
[linux-block.git] / arch / arm / mach-mv78xx0 / pcie.c
index fa68b63941b153a2a8e0cdf2edc8528f7d21ee37..533cb78569432188de24339411e05a6b39a42212 100644 (file)
@@ -186,14 +186,14 @@ static struct pci_ops pcie_ops = {
 static void rc_pci_fixup(struct pci_dev *dev)
 {
        if (dev->bus->parent == NULL && dev->devfn == 0) {
-               int i;
+               struct resource *r;
 
                dev->class &= 0xff;
                dev->class |= PCI_CLASS_BRIDGE_HOST << 8;
-               for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
-                       dev->resource[i].start = 0;
-                       dev->resource[i].end   = 0;
-                       dev->resource[i].flags = 0;
+               pci_dev_for_each_resource(dev, r) {
+                       r->start = 0;
+                       r->end   = 0;
+                       r->flags = 0;
                }
        }
 }