aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
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
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')
-rw-r--r--arch/sparc/include/asm/oplib_32.h11
-rw-r--r--arch/sparc/prom/tree_32.c44
2 files changed, 3 insertions, 52 deletions
diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h
index 640558801b8e..98f70822fa05 100644
--- a/arch/sparc/include/asm/oplib_32.h
+++ b/arch/sparc/include/asm/oplib_32.h
@@ -147,19 +147,11 @@ extern int prom_getbool(phandle node, char *prop);
147/* Acquire a string property, null string on error. */ 147/* Acquire a string property, null string on error. */
148extern void prom_getstring(phandle node, char *prop, char *buf, int bufsize); 148extern void prom_getstring(phandle node, char *prop, char *buf, int bufsize);
149 149
150/* Does the passed node have the given "name"? YES=1 NO=0 */
151extern int prom_nodematch(phandle thisnode, char *name);
152
153/* Search all siblings starting at the passed node for "name" matching 150/* Search all siblings starting at the passed node for "name" matching
154 * the given string. Returns the node on success, zero on failure. 151 * the given string. Returns the node on success, zero on failure.
155 */ 152 */
156extern phandle prom_searchsiblings(phandle node_start, char *name); 153extern phandle prom_searchsiblings(phandle node_start, char *name);
157 154
158/* Return the first property type, as a string, for the given node.
159 * Returns a null string on error.
160 */
161extern char *prom_firstprop(phandle node, char *buffer);
162
163/* Returns the next property after the passed property for the given 155/* Returns the next property after the passed property for the given
164 * node. Returns null string on failure. 156 * node. Returns null string on failure.
165 */ 157 */
@@ -168,9 +160,6 @@ extern char *prom_nextprop(phandle node, char *prev_property, char *buffer);
168/* Returns phandle of the path specified */ 160/* Returns phandle of the path specified */
169extern phandle prom_finddevice(char *name); 161extern phandle prom_finddevice(char *name);
170 162
171/* Returns 1 if the specified node has given property. */
172extern int prom_node_has_property(phandle node, char *property);
173
174/* Set the indicated property at the given node with the passed value. 163/* Set the indicated property at the given node with the passed value.
175 * Returns the number of bytes of your value that the prom took. 164 * Returns the number of bytes of your value that the prom took.
176 */ 165 */
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 */