aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/prom
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2011-01-01 07:53:11 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-03 01:19:40 -0500
commit1f42be484ffc5559a29466c82adac7dd472d4439 (patch)
tree3bcb2340108262ed136322a2eecef0047bafbdc7 /arch/sparc/prom
parenta7e4236511c678bf012901faf3c285d199a1adc8 (diff)
sparc: remove unused prom tree functions
Remove the following unused funtions: prom_nodematch() prom_firstprop() prom_node_has_property() Also declare a few local functions static. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/prom')
-rw-r--r--arch/sparc/prom/tree_32.c44
1 files changed, 3 insertions, 41 deletions
diff --git a/arch/sparc/prom/tree_32.c b/arch/sparc/prom/tree_32.c
index 535e2e69ac1d..f8860eba32c2 100644
--- a/arch/sparc/prom/tree_32.c
+++ b/arch/sparc/prom/tree_32.c
@@ -20,7 +20,7 @@ extern void restore_current(void);
20static char promlib_buf[128]; 20static char promlib_buf[128];
21 21
22/* Internal version of prom_getchild that does not alter return values. */ 22/* Internal version of prom_getchild that does not alter return values. */
23phandle __prom_getchild(phandle node) 23static phandle __prom_getchild(phandle node)
24{ 24{
25 unsigned long flags; 25 unsigned long flags;
26 phandle cnode; 26 phandle cnode;
@@ -52,7 +52,7 @@ phandle prom_getchild(phandle node)
52EXPORT_SYMBOL(prom_getchild); 52EXPORT_SYMBOL(prom_getchild);
53 53
54/* Internal version of prom_getsibling that does not alter return values. */ 54/* Internal version of prom_getsibling that does not alter return values. */
55phandle __prom_getsibling(phandle node) 55static phandle __prom_getsibling(phandle node)
56{ 56{
57 unsigned long flags; 57 unsigned long flags;
58 phandle cnode; 58 phandle cnode;
@@ -177,20 +177,6 @@ void prom_getstring(phandle node, char *prop, char *user_buf, int ubuf_size)
177EXPORT_SYMBOL(prom_getstring); 177EXPORT_SYMBOL(prom_getstring);
178 178
179 179
180/* Does the device at node 'node' have name 'name'?
181 * YES = 1 NO = 0
182 */
183int prom_nodematch(phandle node, char *name)
184{
185 int error;
186
187 static char namebuf[128];
188 error = prom_getproperty(node, "name", namebuf, sizeof(namebuf));
189 if (error == -1) return 0;
190 if(strcmp(namebuf, name) == 0) return 1;
191 return 0;
192}
193
194/* Search siblings at 'node_start' for a node with name 180/* Search siblings at 'node_start' for a node with name
195 * 'nodename'. Return node if successful, zero if not. 181 * 'nodename'. Return node if successful, zero if not.
196 */ 182 */
@@ -214,7 +200,7 @@ phandle prom_searchsiblings(phandle node_start, char *nodename)
214EXPORT_SYMBOL(prom_searchsiblings); 200EXPORT_SYMBOL(prom_searchsiblings);
215 201
216/* Interal version of nextprop that does not alter return values. */ 202/* Interal version of nextprop that does not alter return values. */
217char *__prom_nextprop(phandle node, char * oprop) 203static char *__prom_nextprop(phandle node, char * oprop)
218{ 204{
219 unsigned long flags; 205 unsigned long flags;
220 char *prop; 206 char *prop;
@@ -227,17 +213,6 @@ char *__prom_nextprop(phandle node, char * oprop)
227 return prop; 213 return prop;
228} 214}
229 215
230/* Return the first property name for node 'node'. */
231/* buffer is unused argument, but as v9 uses it, we need to have the same interface */
232char *prom_firstprop(phandle node, char *bufer)
233{
234 if (node == 0 || node == -1)
235 return "";
236
237 return __prom_nextprop(node, "");
238}
239EXPORT_SYMBOL(prom_firstprop);
240
241/* Return the property type string after property type 'oprop' 216/* Return the property type string after property type 'oprop'
242 * at node 'node' . Returns empty string if no more 217 * at node 'node' . Returns empty string if no more
243 * property types for this node. 218 * property types for this node.
@@ -299,19 +274,6 @@ phandle prom_finddevice(char *name)
299} 274}
300EXPORT_SYMBOL(prom_finddevice); 275EXPORT_SYMBOL(prom_finddevice);
301 276
302int prom_node_has_property(phandle node, char *prop)
303{
304 char *current_property = "";
305
306 do {
307 current_property = prom_nextprop(node, current_property, NULL);
308 if(!strcmp(current_property, prop))
309 return 1;
310 } while (*current_property);
311 return 0;
312}
313EXPORT_SYMBOL(prom_node_has_property);
314
315/* Set property 'pname' at node 'node' to value 'value' which has a length 277/* Set property 'pname' at node 'node' to value 'value' which has a length
316 * of 'size' bytes. Return the number of bytes the prom accepted. 278 * of 'size' bytes. Return the number of bytes the prom accepted.
317 */ 279 */