]> err.no Git - linux-2.6/blobdiff - arch/powerpc/kernel/pci_64.c
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[linux-2.6] / arch / powerpc / kernel / pci_64.c
index 5949bbabd7fb7620316d57b08ec012bef9f89a28..52750745edfde77b8fa8f79f612b8cb892728db7 100644 (file)
@@ -227,7 +227,7 @@ EXPORT_SYMBOL(of_create_pci_dev);
 void __devinit of_scan_bus(struct device_node *node,
                           struct pci_bus *bus)
 {
-       struct device_node *child = NULL;
+       struct device_node *child;
        const u32 *reg;
        int reglen, devfn;
        struct pci_dev *dev;
@@ -235,7 +235,7 @@ void __devinit of_scan_bus(struct device_node *node,
        DBG("of_scan_bus(%s) bus no %d... \n", node->full_name, bus->number);
 
        /* Scan direct children */
-       while ((child = of_get_next_child(node, child)) != NULL) {
+       for_each_child_of_node(node, child) {
                DBG("  * %s\n", child->full_name);
                reg = of_get_property(child, "reg", &reglen);
                if (reg == NULL || reglen < 20)
@@ -357,7 +357,6 @@ void __devinit scan_phb(struct pci_controller *hose)
        struct pci_bus *bus;
        struct device_node *node = hose->dn;
        int i, mode;
-       struct resource *res;
 
        DBG("PCI: Scanning PHB %s\n", node ? node->full_name : "<NO NAME>");
 
@@ -375,12 +374,10 @@ void __devinit scan_phb(struct pci_controller *hose)
        pcibios_map_io_space(bus);
 
        /* Wire up PHB bus resources */
-       if (hose->io_resource.flags) {
-               DBG("PCI: PHB IO resource    = %016lx-%016lx [%lx]\n",
-                   hose->io_resource.start, hose->io_resource.end,
-                   hose->io_resource.flags);
-               bus->resource[0] = res = &hose->io_resource;
-       }
+       DBG("PCI: PHB IO resource    = %016lx-%016lx [%lx]\n",
+           hose->io_resource.start, hose->io_resource.end,
+           hose->io_resource.flags);
+       bus->resource[0] = &hose->io_resource;
        for (i = 0; i < 3; ++i) {
                DBG("PCI: PHB MEM resource %d = %016lx-%016lx [%lx]\n", i,
                    hose->mem_resources[i].start,