]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/powerpc/kernel/pci-common.c
PCI: clear bridge resource range if BIOS assigned bad one
[net-next-2.6.git] / arch / powerpc / kernel / pci-common.c
index 0c0567e58409ae006ae4f077d4a54e2a29fb81d4..5b38f6ae2b299695139c25a21cff0b73f8857808 100644 (file)
@@ -1097,8 +1097,8 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
                if (dev->is_added)
                        continue;
 
-               /* Setup OF node pointer in archdata */
-               sd->of_node = pci_device_to_OF_node(dev);
+               /* Setup OF node pointer in the device */
+               dev->dev.of_node = pci_device_to_OF_node(dev);
 
                /* Fixup NUMA node as it may not be setup yet by the generic
                 * code and is needed by the DMA init
@@ -1309,6 +1309,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
                printk(KERN_WARNING "PCI: Cannot allocate resource region "
                       "%d of PCI bridge %d, will remap\n", i, bus->number);
 clear_resource:
+               res->start = res->end = 0;
                res->flags = 0;
        }