diff options
author | Andres Salomon <dilinger@queued.net> | 2010-10-10 23:51:25 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-10-12 23:58:00 -0400 |
commit | ed41850298f7a55519de0b8573e217ed8a45c199 (patch) | |
tree | 91cfaefe78cf4a59366274c82f7504696d7f3284 /drivers/of | |
parent | f90c34bd658d240cb5ebc5fe0a17796e590c6ec8 (diff) |
of/promtree: add of_pdt namespace to pdt code
For symbols still lacking namespace qualifiers, add an of_pdt_ prefix.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/pdt.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/of/pdt.c b/drivers/of/pdt.c index fd02fc1dd891..31a4fb8694db 100644 --- a/drivers/of/pdt.c +++ b/drivers/of/pdt.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | static struct of_pdt_ops *of_pdt_prom_ops __initdata; | 27 | static struct of_pdt_ops *of_pdt_prom_ops __initdata; |
28 | 28 | ||
29 | void __initdata (*prom_build_more)(struct device_node *dp, | 29 | void __initdata (*of_pdt_build_more)(struct device_node *dp, |
30 | struct device_node ***nextp); | 30 | struct device_node ***nextp); |
31 | 31 | ||
32 | #if defined(CONFIG_SPARC) | 32 | #if defined(CONFIG_SPARC) |
@@ -53,7 +53,7 @@ static inline const char *of_pdt_node_name(struct device_node *dp) | |||
53 | 53 | ||
54 | #endif /* !CONFIG_SPARC */ | 54 | #endif /* !CONFIG_SPARC */ |
55 | 55 | ||
56 | static struct property * __init build_one_prop(phandle node, char *prev, | 56 | static struct property * __init of_pdt_build_one_prop(phandle node, char *prev, |
57 | char *special_name, | 57 | char *special_name, |
58 | void *special_val, | 58 | void *special_val, |
59 | int special_len) | 59 | int special_len) |
@@ -100,17 +100,17 @@ static struct property * __init build_one_prop(phandle node, char *prev, | |||
100 | return p; | 100 | return p; |
101 | } | 101 | } |
102 | 102 | ||
103 | static struct property * __init build_prop_list(phandle node) | 103 | static struct property * __init of_pdt_build_prop_list(phandle node) |
104 | { | 104 | { |
105 | struct property *head, *tail; | 105 | struct property *head, *tail; |
106 | 106 | ||
107 | head = tail = build_one_prop(node, NULL, | 107 | head = tail = of_pdt_build_one_prop(node, NULL, |
108 | ".node", &node, sizeof(node)); | 108 | ".node", &node, sizeof(node)); |
109 | 109 | ||
110 | tail->next = build_one_prop(node, NULL, NULL, NULL, 0); | 110 | tail->next = of_pdt_build_one_prop(node, NULL, NULL, NULL, 0); |
111 | tail = tail->next; | 111 | tail = tail->next; |
112 | while(tail) { | 112 | while(tail) { |
113 | tail->next = build_one_prop(node, tail->name, | 113 | tail->next = of_pdt_build_one_prop(node, tail->name, |
114 | NULL, NULL, 0); | 114 | NULL, NULL, 0); |
115 | tail = tail->next; | 115 | tail = tail->next; |
116 | } | 116 | } |
@@ -118,7 +118,7 @@ static struct property * __init build_prop_list(phandle node) | |||
118 | return head; | 118 | return head; |
119 | } | 119 | } |
120 | 120 | ||
121 | static char * __init get_one_property(phandle node, const char *name) | 121 | static char * __init of_pdt_get_one_property(phandle node, const char *name) |
122 | { | 122 | { |
123 | char *buf = "<NULL>"; | 123 | char *buf = "<NULL>"; |
124 | int len; | 124 | int len; |
@@ -132,7 +132,7 @@ static char * __init get_one_property(phandle node, const char *name) | |||
132 | return buf; | 132 | return buf; |
133 | } | 133 | } |
134 | 134 | ||
135 | static struct device_node * __init prom_create_node(phandle node, | 135 | static struct device_node * __init of_pdt_create_node(phandle node, |
136 | struct device_node *parent) | 136 | struct device_node *parent) |
137 | { | 137 | { |
138 | struct device_node *dp; | 138 | struct device_node *dp; |
@@ -146,18 +146,18 @@ static struct device_node * __init prom_create_node(phandle node, | |||
146 | 146 | ||
147 | kref_init(&dp->kref); | 147 | kref_init(&dp->kref); |
148 | 148 | ||
149 | dp->name = get_one_property(node, "name"); | 149 | dp->name = of_pdt_get_one_property(node, "name"); |
150 | dp->type = get_one_property(node, "device_type"); | 150 | dp->type = of_pdt_get_one_property(node, "device_type"); |
151 | dp->phandle = node; | 151 | dp->phandle = node; |
152 | 152 | ||
153 | dp->properties = build_prop_list(node); | 153 | dp->properties = of_pdt_build_prop_list(node); |
154 | 154 | ||
155 | irq_trans_init(dp); | 155 | irq_trans_init(dp); |
156 | 156 | ||
157 | return dp; | 157 | return dp; |
158 | } | 158 | } |
159 | 159 | ||
160 | static char * __init build_full_name(struct device_node *dp) | 160 | static char * __init of_pdt_build_full_name(struct device_node *dp) |
161 | { | 161 | { |
162 | int len, ourlen, plen; | 162 | int len, ourlen, plen; |
163 | char *n; | 163 | char *n; |
@@ -177,7 +177,7 @@ static char * __init build_full_name(struct device_node *dp) | |||
177 | return n; | 177 | return n; |
178 | } | 178 | } |
179 | 179 | ||
180 | static struct device_node * __init prom_build_tree(struct device_node *parent, | 180 | static struct device_node * __init of_pdt_build_tree(struct device_node *parent, |
181 | phandle node, | 181 | phandle node, |
182 | struct device_node ***nextp) | 182 | struct device_node ***nextp) |
183 | { | 183 | { |
@@ -185,7 +185,7 @@ static struct device_node * __init prom_build_tree(struct device_node *parent, | |||
185 | struct device_node *dp; | 185 | struct device_node *dp; |
186 | 186 | ||
187 | while (1) { | 187 | while (1) { |
188 | dp = prom_create_node(node, parent); | 188 | dp = of_pdt_create_node(node, parent); |
189 | if (!dp) | 189 | if (!dp) |
190 | break; | 190 | break; |
191 | 191 | ||
@@ -202,13 +202,13 @@ static struct device_node * __init prom_build_tree(struct device_node *parent, | |||
202 | #if defined(CONFIG_SPARC) | 202 | #if defined(CONFIG_SPARC) |
203 | dp->path_component_name = build_path_component(dp); | 203 | dp->path_component_name = build_path_component(dp); |
204 | #endif | 204 | #endif |
205 | dp->full_name = build_full_name(dp); | 205 | dp->full_name = of_pdt_build_full_name(dp); |
206 | 206 | ||
207 | dp->child = prom_build_tree(dp, | 207 | dp->child = of_pdt_build_tree(dp, |
208 | of_pdt_prom_ops->getchild(node), nextp); | 208 | of_pdt_prom_ops->getchild(node), nextp); |
209 | 209 | ||
210 | if (prom_build_more) | 210 | if (of_pdt_build_more) |
211 | prom_build_more(dp, nextp); | 211 | of_pdt_build_more(dp, nextp); |
212 | 212 | ||
213 | node = of_pdt_prom_ops->getsibling(node); | 213 | node = of_pdt_prom_ops->getsibling(node); |
214 | } | 214 | } |
@@ -223,13 +223,13 @@ void __init of_pdt_build_devicetree(phandle root_node, struct of_pdt_ops *ops) | |||
223 | BUG_ON(!ops); | 223 | BUG_ON(!ops); |
224 | of_pdt_prom_ops = ops; | 224 | of_pdt_prom_ops = ops; |
225 | 225 | ||
226 | allnodes = prom_create_node(root_node, NULL); | 226 | allnodes = of_pdt_create_node(root_node, NULL); |
227 | #if defined(CONFIG_SPARC) | 227 | #if defined(CONFIG_SPARC) |
228 | allnodes->path_component_name = ""; | 228 | allnodes->path_component_name = ""; |
229 | #endif | 229 | #endif |
230 | allnodes->full_name = "/"; | 230 | allnodes->full_name = "/"; |
231 | 231 | ||
232 | nextp = &allnodes->allnext; | 232 | nextp = &allnodes->allnext; |
233 | allnodes->child = prom_build_tree(allnodes, | 233 | allnodes->child = of_pdt_build_tree(allnodes, |
234 | of_pdt_prom_ops->getchild(allnodes->phandle), &nextp); | 234 | of_pdt_prom_ops->getchild(allnodes->phandle), &nextp); |
235 | } | 235 | } |