aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/prom/tree_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/prom/tree_32.c')
-rw-r--r--arch/sparc/prom/tree_32.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/sparc/prom/tree_32.c b/arch/sparc/prom/tree_32.c
index 535e2e69ac1d..f1d0734c245e 100644
--- a/arch/sparc/prom/tree_32.c
+++ b/arch/sparc/prom/tree_32.c
@@ -40,11 +40,11 @@ phandle prom_getchild(phandle node)
40{ 40{
41 phandle cnode; 41 phandle cnode;
42 42
43 if (node == -1) 43 if ((s32)node == -1)
44 return 0; 44 return 0;
45 45
46 cnode = __prom_getchild(node); 46 cnode = __prom_getchild(node);
47 if (cnode == 0 || cnode == -1) 47 if (cnode == 0 || (s32)cnode == -1)
48 return 0; 48 return 0;
49 49
50 return cnode; 50 return cnode;
@@ -72,11 +72,11 @@ phandle prom_getsibling(phandle node)
72{ 72{
73 phandle sibnode; 73 phandle sibnode;
74 74
75 if (node == -1) 75 if ((s32)node == -1)
76 return 0; 76 return 0;
77 77
78 sibnode = __prom_getsibling(node); 78 sibnode = __prom_getsibling(node);
79 if (sibnode == 0 || sibnode == -1) 79 if (sibnode == 0 || (s32)sibnode == -1)
80 return 0; 80 return 0;
81 81
82 return sibnode; 82 return sibnode;
@@ -231,7 +231,7 @@ char *__prom_nextprop(phandle node, char * oprop)
231/* buffer is unused argument, but as v9 uses it, we need to have the same interface */ 231/* buffer is unused argument, but as v9 uses it, we need to have the same interface */
232char *prom_firstprop(phandle node, char *bufer) 232char *prom_firstprop(phandle node, char *bufer)
233{ 233{
234 if (node == 0 || node == -1) 234 if (node == 0 || (s32)node == -1)
235 return ""; 235 return "";
236 236
237 return __prom_nextprop(node, ""); 237 return __prom_nextprop(node, "");
@@ -244,7 +244,7 @@ EXPORT_SYMBOL(prom_firstprop);
244 */ 244 */
245char *prom_nextprop(phandle node, char *oprop, char *buffer) 245char *prom_nextprop(phandle node, char *oprop, char *buffer)
246{ 246{
247 if (node == 0 || node == -1) 247 if (node == 0 || (s32)node == -1)
248 return ""; 248 return "";
249 249
250 return __prom_nextprop(node, oprop); 250 return __prom_nextprop(node, oprop);
@@ -278,7 +278,7 @@ phandle prom_finddevice(char *name)
278 if (d != s + 3 && (!*d || *d == '/') 278 if (d != s + 3 && (!*d || *d == '/')
279 && d <= s + 3 + 8) { 279 && d <= s + 3 + 8) {
280 node2 = node; 280 node2 = node;
281 while (node2 && node2 != -1) { 281 while (node2 && (s32)node2 != -1) {
282 if (prom_getproperty (node2, "reg", (char *)reg, sizeof (reg)) > 0) { 282 if (prom_getproperty (node2, "reg", (char *)reg, sizeof (reg)) > 0) {
283 if (which_io == reg[0].which_io && phys_addr == reg[0].phys_addr) { 283 if (which_io == reg[0].which_io && phys_addr == reg[0].phys_addr) {
284 node = node2; 284 node = node2;
@@ -286,7 +286,7 @@ phandle prom_finddevice(char *name)
286 } 286 }
287 } 287 }
288 node2 = prom_getsibling(node2); 288 node2 = prom_getsibling(node2);
289 if (!node2 || node2 == -1) 289 if (!node2 || (s32)node2 == -1)
290 break; 290 break;
291 node2 = prom_searchsiblings(prom_getsibling(node2), nbuf); 291 node2 = prom_searchsiblings(prom_getsibling(node2), nbuf);
292 } 292 }
@@ -339,6 +339,7 @@ phandle prom_inst2pkg(int inst)
339 node = (*romvec->pv_v2devops.v2_inst2pkg)(inst); 339 node = (*romvec->pv_v2devops.v2_inst2pkg)(inst);
340 restore_current(); 340 restore_current();
341 spin_unlock_irqrestore(&prom_lock, flags); 341 spin_unlock_irqrestore(&prom_lock, flags);
342 if (node == -1) return 0; 342 if ((s32)node == -1)
343 return 0;
343 return node; 344 return node;
344} 345}