powerpc: Use of for_each_node_by_name() instead of open-coding it
Instead of manually coding the loop with of_find_node_by_name(), let's switch to the standard macro for iterating over nodes with given name. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> [mpe: Fix build failures due to typo in mpc832x_mds.c] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Этот коммит содержится в:

коммит произвёл
Michael Ellerman

родитель
df26200299
Коммит
0aa8ff9b76
@@ -343,8 +343,7 @@ void __init spider_init_IRQ(void)
|
||||
* device-tree is bogus anyway) so all we can do is pray or maybe test
|
||||
* the address and deduce the node-id
|
||||
*/
|
||||
for (dn = NULL;
|
||||
(dn = of_find_node_by_name(dn, "interrupt-controller"));) {
|
||||
for_each_node_by_name(dn, "interrupt-controller") {
|
||||
if (of_device_is_compatible(dn, "CBEA,platform-spider-pic")) {
|
||||
if (of_address_to_resource(dn, 0, &r)) {
|
||||
printk(KERN_WARNING "spider-pic: Failed\n");
|
||||
|
Ссылка в новой задаче
Block a user