[POWERPC] rename add_bridge to avoid namespace clashes
authorArnd Bergmann <arnd@arndb.de>
Sun, 17 Jun 2007 23:06:54 +0000 (01:06 +0200)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 29 Jun 2007 06:56:23 +0000 (01:56 -0500)
Many platforms currently define their own add_bridge function, some
of them globally. This breaks some multiplatform configurations.
Prefixing each of these functions with the platform name avoids
this problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
21 files changed:
arch/powerpc/platforms/82xx/mpc82xx_ads.c
arch/powerpc/platforms/83xx/mpc8313_rdb.c
arch/powerpc/platforms/83xx/mpc832x_mds.c
arch/powerpc/platforms/83xx/mpc832x_rdb.c
arch/powerpc/platforms/83xx/mpc834x_itx.c
arch/powerpc/platforms/83xx/mpc834x_mds.c
arch/powerpc/platforms/83xx/mpc836x_mds.c
arch/powerpc/platforms/83xx/mpc83xx.h
arch/powerpc/platforms/83xx/pci.c
arch/powerpc/platforms/85xx/mpc85xx.h
arch/powerpc/platforms/85xx/mpc85xx_ads.c
arch/powerpc/platforms/85xx/mpc85xx_cds.c
arch/powerpc/platforms/85xx/mpc85xx_mds.c
arch/powerpc/platforms/85xx/pci.c
arch/powerpc/platforms/86xx/mpc86xx.h
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
arch/powerpc/platforms/86xx/pci.c
arch/powerpc/platforms/embedded6xx/linkstation.c
arch/powerpc/platforms/maple/pci.c
arch/powerpc/platforms/pasemi/pci.c
arch/powerpc/platforms/powermac/pci.c

index 47cb09f..dc16bb4 100644 (file)
@@ -515,7 +515,7 @@ static int m82xx_pci_exclude_device(u_char bus, u_char devfn)
                return PCIBIOS_SUCCESSFUL;
 }
 
-void __init add_bridge(struct device_node *np)
+static void __init mpc82xx_add_bridge(struct device_node *np)
 {
        int len;
        struct pci_controller *hose;
@@ -584,7 +584,7 @@ static void __init mpc82xx_ads_setup_arch(void)
 #ifdef CONFIG_PCI
        ppc_md.pci_exclude_device = m82xx_pci_exclude_device;
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc82xx_add_bridge(np);
 
        of_node_put(np);
 #endif
index 96970ac..ecf34fa 100644 (file)
@@ -49,7 +49,7 @@ static void __init mpc8313_rdb_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc83xx_add_bridge(np);
 
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
index 94843ed..55e8079 100644 (file)
@@ -80,7 +80,7 @@ static void __init mpc832x_sys_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc83xx_add_bridge(np);
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
 
index 3db68b7..8b790d4 100644 (file)
@@ -53,7 +53,7 @@ static void __init mpc832x_rdb_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc83xx_add_bridge(np);
 
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
index 40a0194..120c5d2 100644 (file)
@@ -59,7 +59,7 @@ static void __init mpc834x_itx_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc83xx_add_bridge(np);
 
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
index 10394b2..d64d5a5 100644 (file)
@@ -129,7 +129,7 @@ static void __init mpc834x_mds_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc83xx_add_bridge(np);
 
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
index bceeff8..bf3be37 100644 (file)
@@ -86,7 +86,7 @@ static void __init mpc836x_mds_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc83xx_add_bridge(np);
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
 
index 9cd03b5..9bd85f5 100644 (file)
@@ -27,7 +27,7 @@
  * mpc83xx_* files. Mostly for use by mpc83xx_setup
  */
 
-extern int add_bridge(struct device_node *dev);
+extern int mpc83xx_add_bridge(struct device_node *dev);
 extern int mpc83xx_exclude_device(u_char bus, u_char devfn);
 extern void mpc83xx_restart(char *cmd);
 extern long mpc83xx_time_init(void);
index 774457d..1752d45 100644 (file)
@@ -45,7 +45,7 @@ int mpc83xx_exclude_device(u_char bus, u_char devfn)
        return PCIBIOS_SUCCESSFUL;
 }
 
-int __init add_bridge(struct device_node *dev)
+int __init mpc83xx_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
index 83415db..7286ffa 100644 (file)
@@ -15,4 +15,4 @@
  */
 
 extern void mpc85xx_restart(char *);
-extern int add_bridge(struct device_node *dev);
+extern int mpc85xx_add_bridge(struct device_node *dev);
index 5d27621..a4995de 100644 (file)
@@ -241,7 +241,7 @@ static void __init mpc85xx_ads_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc85xx_add_bridge(np);
        ppc_md.pci_exclude_device = mpc85xx_exclude_device;
 #endif
 }
index 1490eb3..4059254 100644 (file)
@@ -257,7 +257,7 @@ static void __init mpc85xx_cds_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc85xx_add_bridge(np);
 
        ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup;
        ppc_md.pci_exclude_device = mpc85xx_exclude_device;
index e3dddbf..7310818 100644 (file)
@@ -100,7 +100,7 @@ static void __init mpc85xx_mds_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
-               add_bridge(np);
+               mpc85xx_add_bridge(np);
        }
        of_node_put(np);
 #endif
index 48f17e2..3c38ae4 100644 (file)
@@ -36,7 +36,7 @@
 int mpc85xx_pci2_busno = 0;
 
 #ifdef CONFIG_PCI
-int __init add_bridge(struct device_node *dev)
+int __init mpc85xx_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
index 2834462..dc2f6fd 100644 (file)
@@ -15,7 +15,7 @@
  * mpc86xx_* files. Mostly for use by mpc86xx_setup().
  */
 
-extern int add_bridge(struct device_node *dev);
+extern int mpc86xx_add_bridge(struct device_node *dev);
 
 extern int mpc86xx_exclude_device(u_char bus, u_char devfn);
 
index 1051702..23f3e1b 100644 (file)
@@ -364,7 +364,7 @@ mpc86xx_hpcn_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc86xx_add_bridge(np);
 
        ppc_md.pci_exclude_device = mpc86xx_exclude_device;
 #endif
index 8235c56..c1d65fa 100644 (file)
@@ -148,7 +148,7 @@ int mpc86xx_exclude_device(u_char bus, u_char devfn)
        return PCIBIOS_SUCCESSFUL;
 }
 
-int __init add_bridge(struct device_node *dev)
+int __init mpc86xx_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
index b412f00..f3ae0a7 100644 (file)
@@ -54,7 +54,7 @@ static struct mtd_partition linkstation_physmap_partitions[] = {
        },
 };
 
-static int __init add_bridge(struct device_node *dev)
+static int __init linkstation_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
@@ -92,7 +92,7 @@ static void __init linkstation_setup_arch(void)
 
        /* Lookup PCI host bridges */
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               linkstation_add_bridge(np);
 
        printk(KERN_INFO "BUFFALO Network Attached Storage Series\n");
        printk(KERN_INFO "(C) 2002-2005 BUFFALO INC.\n");
index f357b92..fceaae4 100644 (file)
@@ -444,7 +444,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
        u3_ht = hose;
 }
 
-static int __init add_bridge(struct device_node *dev)
+static int __init maple_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
@@ -541,7 +541,7 @@ void __init maple_pci_init(void)
                        continue;
                if ((of_device_is_compatible(np, "u4-pcie") ||
                     of_device_is_compatible(np, "u3-agp")) &&
-                   add_bridge(np) == 0)
+                   maple_add_bridge(np) == 0)
                        of_node_get(np);
 
                if (of_device_is_compatible(np, "u3-ht")) {
@@ -553,7 +553,7 @@ void __init maple_pci_init(void)
 
        /* Now setup the HyperTransport host if we found any
         */
-       if (ht && add_bridge(ht) != 0)
+       if (ht && maple_add_bridge(ht) != 0)
                of_node_put(ht);
 
        /* Setup the linkage between OF nodes and PHBs */ 
index 5606f25..ab1f5f6 100644 (file)
@@ -132,7 +132,7 @@ static void __init setup_pa_pxp(struct pci_controller *hose)
        hose->cfg_data = ioremap(0xe0000000, 0x10000000);
 }
 
-static int __init add_bridge(struct device_node *dev)
+static int __init pas_add_bridge(struct device_node *dev)
 {
        struct pci_controller *hose;
 
@@ -167,7 +167,7 @@ void __init pas_pci_init(void)
        }
 
        for (np = NULL; (np = of_get_next_child(root, np)) != NULL;)
-               if (np->name && !strcmp(np->name, "pxp") && !add_bridge(np))
+               if (np->name && !strcmp(np->name, "pxp") && !pas_add_bridge(np))
                        of_node_get(np);
 
        of_node_put(root);
index 8302e34..fb853c0 100644 (file)
@@ -35,8 +35,6 @@
 #define DBG(x...)
 #endif
 
-static int add_bridge(struct device_node *dev);
-
 /* XXX Could be per-controller, but I don't think we risk anything by
  * assuming we won't have both UniNorth and Bandit */
 static int has_uninorth;
@@ -897,7 +895,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
  * "pci" (a MPC106) and no bandit or chaos bridges, and contrariwise,
  * if we have one or more bandit or chaos bridges, we don't have a MPC106.
  */
-static int __init add_bridge(struct device_node *dev)
+static int __init pmac_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
@@ -1023,7 +1021,7 @@ void __init pmac_pci_init(void)
                if (strcmp(np->name, "bandit") == 0
                    || strcmp(np->name, "chaos") == 0
                    || strcmp(np->name, "pci") == 0) {
-                       if (add_bridge(np) == 0)
+                       if (pmac_add_bridge(np) == 0)
                                of_node_get(np);
                }
                if (strcmp(np->name, "ht") == 0) {
@@ -1037,7 +1035,7 @@ void __init pmac_pci_init(void)
        /* Probe HT last as it relies on the agp resources to be already
         * setup
         */
-       if (ht && add_bridge(ht) != 0)
+       if (ht && pmac_add_bridge(ht) != 0)
                of_node_put(ht);
 
        /* Setup the linkage between OF nodes and PHBs */