提交 16c1d606 编写于 作者: M Michael Ellerman

powerpc/prom: Use of_get_next_parent() in of_get_ibm_chip_id()

Use of_get_next_parent() to simplifiy the logic in of_get_ibm_chip_id().
Original-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 f755ecfb
......@@ -784,7 +784,6 @@ int of_get_ibm_chip_id(struct device_node *np)
{
of_node_get(np);
while (np) {
struct device_node *old = np;
u32 chip_id;
/*
......@@ -795,8 +794,8 @@ int of_get_ibm_chip_id(struct device_node *np)
of_node_put(np);
return chip_id;
}
np = of_get_parent(np);
of_node_put(old);
np = of_get_next_parent(np);
}
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册