提交 f623f388 编写于 作者: D David S. Miller

[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: NDavid S. Miller <davem@davemloft.net>
上级 8163904e
......@@ -415,7 +415,7 @@ static void __init of_console_init(void)
unsigned long flags;
const char *type;
phandle node;
int skip, fd;
int skip, tmp, fd;
of_console_path = prom_early_alloc(256);
......@@ -442,8 +442,9 @@ static void __init of_console_init(void)
prom_halt();
}
tmp = skip;
for_each_node_by_type(dp, type) {
if (!skip--)
if (!tmp--)
break;
}
if (!dp) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册