diff --git a/drivers/of/pdt.c b/drivers/of/pdt.c
index fd02fc1..31a4fb8 100644
--- a/drivers/of/pdt.c
+++ b/drivers/of/pdt.c
@@ -26,7 +26,7 @@
 
 static struct of_pdt_ops *of_pdt_prom_ops __initdata;
 
-void __initdata (*prom_build_more)(struct device_node *dp,
+void __initdata (*of_pdt_build_more)(struct device_node *dp,
 		struct device_node ***nextp);
 
 #if defined(CONFIG_SPARC)
@@ -53,7 +53,7 @@
 
 #endif /* !CONFIG_SPARC */
 
-static struct property * __init build_one_prop(phandle node, char *prev,
+static struct property * __init of_pdt_build_one_prop(phandle node, char *prev,
 					       char *special_name,
 					       void *special_val,
 					       int special_len)
@@ -100,17 +100,17 @@
 	return p;
 }
 
-static struct property * __init build_prop_list(phandle node)
+static struct property * __init of_pdt_build_prop_list(phandle node)
 {
 	struct property *head, *tail;
 
-	head = tail = build_one_prop(node, NULL,
+	head = tail = of_pdt_build_one_prop(node, NULL,
 				     ".node", &node, sizeof(node));
 
-	tail->next = build_one_prop(node, NULL, NULL, NULL, 0);
+	tail->next = of_pdt_build_one_prop(node, NULL, NULL, NULL, 0);
 	tail = tail->next;
 	while(tail) {
-		tail->next = build_one_prop(node, tail->name,
+		tail->next = of_pdt_build_one_prop(node, tail->name,
 					    NULL, NULL, 0);
 		tail = tail->next;
 	}
@@ -118,7 +118,7 @@
 	return head;
 }
 
-static char * __init get_one_property(phandle node, const char *name)
+static char * __init of_pdt_get_one_property(phandle node, const char *name)
 {
 	char *buf = "<NULL>";
 	int len;
@@ -132,7 +132,7 @@
 	return buf;
 }
 
-static struct device_node * __init prom_create_node(phandle node,
+static struct device_node * __init of_pdt_create_node(phandle node,
 						    struct device_node *parent)
 {
 	struct device_node *dp;
@@ -146,18 +146,18 @@
 
 	kref_init(&dp->kref);
 
-	dp->name = get_one_property(node, "name");
-	dp->type = get_one_property(node, "device_type");
+	dp->name = of_pdt_get_one_property(node, "name");
+	dp->type = of_pdt_get_one_property(node, "device_type");
 	dp->phandle = node;
 
-	dp->properties = build_prop_list(node);
+	dp->properties = of_pdt_build_prop_list(node);
 
 	irq_trans_init(dp);
 
 	return dp;
 }
 
-static char * __init build_full_name(struct device_node *dp)
+static char * __init of_pdt_build_full_name(struct device_node *dp)
 {
 	int len, ourlen, plen;
 	char *n;
@@ -177,7 +177,7 @@
 	return n;
 }
 
-static struct device_node * __init prom_build_tree(struct device_node *parent,
+static struct device_node * __init of_pdt_build_tree(struct device_node *parent,
 						   phandle node,
 						   struct device_node ***nextp)
 {
@@ -185,7 +185,7 @@
 	struct device_node *dp;
 
 	while (1) {
-		dp = prom_create_node(node, parent);
+		dp = of_pdt_create_node(node, parent);
 		if (!dp)
 			break;
 
@@ -202,13 +202,13 @@
 #if defined(CONFIG_SPARC)
 		dp->path_component_name = build_path_component(dp);
 #endif
-		dp->full_name = build_full_name(dp);
+		dp->full_name = of_pdt_build_full_name(dp);
 
-		dp->child = prom_build_tree(dp,
+		dp->child = of_pdt_build_tree(dp,
 				of_pdt_prom_ops->getchild(node), nextp);
 
-		if (prom_build_more)
-			prom_build_more(dp, nextp);
+		if (of_pdt_build_more)
+			of_pdt_build_more(dp, nextp);
 
 		node = of_pdt_prom_ops->getsibling(node);
 	}
@@ -223,13 +223,13 @@
 	BUG_ON(!ops);
 	of_pdt_prom_ops = ops;
 
-	allnodes = prom_create_node(root_node, NULL);
+	allnodes = of_pdt_create_node(root_node, NULL);
 #if defined(CONFIG_SPARC)
 	allnodes->path_component_name = "";
 #endif
 	allnodes->full_name = "/";
 
 	nextp = &allnodes->allnext;
-	allnodes->child = prom_build_tree(allnodes,
+	allnodes->child = of_pdt_build_tree(allnodes,
 			of_pdt_prom_ops->getchild(allnodes->phandle), &nextp);
 }
