]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/prom_parse.c
Merge branch 'from-linus' into upstream
[karo-tx-linux.git] / arch / powerpc / kernel / prom_parse.c
index 309ae1d5fa77c0d007d05ff5560a0f45fbc1aed5..3934c227549b07a1f08ba59c86ac497ce6c0a45f 100644 (file)
@@ -113,7 +113,8 @@ static unsigned int of_bus_default_get_flags(u32 *addr)
 
 static int of_bus_pci_match(struct device_node *np)
 {
-       return !strcmp(np->type, "pci");
+       /* "vci" is for the /chaos bridge on 1st-gen PCI powermacs */
+       return !strcmp(np->type, "pci") || !strcmp(np->type, "vci");
 }
 
 static void of_bus_pci_count_cells(struct device_node *np,
@@ -464,8 +465,10 @@ u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
        if (parent == NULL)
                return NULL;
        bus = of_match_bus(parent);
-       if (strcmp(bus->name, "pci"))
+       if (strcmp(bus->name, "pci")) {
+               of_node_put(parent);
                return NULL;
+       }
        bus->count_cells(dev, &na, &ns);
        of_node_put(parent);
        if (!OF_CHECK_COUNTS(na, ns))