aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-07-29 05:10:37 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-30 03:27:37 -0400
commitf623f388e4f83c01ac23f228247a6a4b9cc71111 (patch)
tree4ee8e54a33e88d0197442f60f36b85dc5d842ad1
parent8163904e660a30be800a3361df69bf9dad3b44cd (diff)
[SPARC]: Fix serial console node string creation.
The string setting code depends upon the original value of the "skip" variable, not the one that gets modified by the node traversal loop. Based upon a patch by Mark Fortescue. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc/kernel/prom.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sparc/kernel/prom.c b/arch/sparc/kernel/prom.c
index e3a537650db1..39fbd3c8ab0b 100644
--- a/arch/sparc/kernel/prom.c
+++ b/arch/sparc/kernel/prom.c
@@ -415,7 +415,7 @@ static void __init of_console_init(void)
415 unsigned long flags; 415 unsigned long flags;
416 const char *type; 416 const char *type;
417 phandle node; 417 phandle node;
418 int skip, fd; 418 int skip, tmp, fd;
419 419
420 of_console_path = prom_early_alloc(256); 420 of_console_path = prom_early_alloc(256);
421 421
@@ -442,8 +442,9 @@ static void __init of_console_init(void)
442 prom_halt(); 442 prom_halt();
443 } 443 }
444 444
445 tmp = skip;
445 for_each_node_by_type(dp, type) { 446 for_each_node_by_type(dp, type) {
446 if (!skip--) 447 if (!tmp--)
447 break; 448 break;
448 } 449 }
449 if (!dp) { 450 if (!dp) {