.. | .. |
---|
101 | 101 | * Find the "gpio" parent node |
---|
102 | 102 | */ |
---|
103 | 103 | |
---|
104 | | - for (gparent = NULL; |
---|
105 | | - (gparent = of_get_next_child(macio->of_node, gparent)) != NULL;) |
---|
106 | | - if (strcmp(gparent->name, "gpio") == 0) |
---|
| 104 | + for_each_child_of_node(macio->of_node, gparent) |
---|
| 105 | + if (of_node_name_eq(gparent, "gpio")) |
---|
107 | 106 | break; |
---|
108 | 107 | if (gparent == NULL) |
---|
109 | 108 | return; |
---|
.. | .. |
---|
115 | 114 | * Ok, got one, we dont need anything special to track them down, so |
---|
116 | 115 | * we just create them all |
---|
117 | 116 | */ |
---|
118 | | - for (gp = NULL; (gp = of_get_next_child(gparent, gp)) != NULL;) { |
---|
| 117 | + for_each_child_of_node(gparent, gp) { |
---|
119 | 118 | const u32 *reg = of_get_property(gp, "reg", NULL); |
---|
120 | 119 | unsigned long offset; |
---|
121 | 120 | if (reg == NULL) |
---|
.. | .. |
---|
134 | 133 | macio->of_node); |
---|
135 | 134 | |
---|
136 | 135 | /* And now we run all the init ones */ |
---|
137 | | - for (gp = NULL; (gp = of_get_next_child(gparent, gp)) != NULL;) |
---|
| 136 | + for_each_child_of_node(gparent, gp) |
---|
138 | 137 | pmf_do_functions(gp, NULL, 0, PMF_FLAGS_ON_INIT, NULL); |
---|
139 | 138 | |
---|
140 | 139 | /* Note: We do not at this point implement the "at sleep" or "at wake" |
---|
.. | .. |
---|
313 | 312 | * Install handlers for the hwclock child if any |
---|
314 | 313 | */ |
---|
315 | 314 | for (np = NULL; (np = of_get_next_child(uninorth_node, np)) != NULL;) |
---|
316 | | - if (strcmp(np->name, "hw-clock") == 0) { |
---|
| 315 | + if (of_node_name_eq(np, "hw-clock")) { |
---|
317 | 316 | unin_hwclock = np; |
---|
318 | 317 | break; |
---|
319 | 318 | } |
---|