Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/wii: Simplify with scoped for each OF child loop

Use scoped for-each loop when iterating over device nodes to make code a
bit simpler.

Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Link: https://patch.msgid.link/20260109-of-for-each-compatible-scoped-v3-5-c22fa2c0749a@oss.qualcomm.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Rob Herring (Arm)
9572933b e0af1408

+1 -3
+1 -3
arch/powerpc/platforms/embedded6xx/hlwd-pic.c
··· 201 201 void __init hlwd_pic_probe(void) 202 202 { 203 203 struct irq_domain *host; 204 - struct device_node *np; 205 204 const u32 *interrupts; 206 205 int cascade_virq; 207 206 208 - for_each_compatible_node(np, NULL, "nintendo,hollywood-pic") { 207 + for_each_compatible_node_scoped(np, NULL, "nintendo,hollywood-pic") { 209 208 interrupts = of_get_property(np, "interrupts", NULL); 210 209 if (interrupts) { 211 210 host = hlwd_pic_init(np); ··· 214 215 irq_set_chained_handler(cascade_virq, 215 216 hlwd_pic_irq_cascade); 216 217 hlwd_irq_host = host; 217 - of_node_put(np); 218 218 break; 219 219 } 220 220 }