mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
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>
This commit is contained in:
parent
e0af14088e
commit
9572933b56
1 changed files with 1 additions and 3 deletions
|
|
@ -201,11 +201,10 @@ unsigned int hlwd_pic_get_irq(void)
|
|||
void __init hlwd_pic_probe(void)
|
||||
{
|
||||
struct irq_domain *host;
|
||||
struct device_node *np;
|
||||
const u32 *interrupts;
|
||||
int cascade_virq;
|
||||
|
||||
for_each_compatible_node(np, NULL, "nintendo,hollywood-pic") {
|
||||
for_each_compatible_node_scoped(np, NULL, "nintendo,hollywood-pic") {
|
||||
interrupts = of_get_property(np, "interrupts", NULL);
|
||||
if (interrupts) {
|
||||
host = hlwd_pic_init(np);
|
||||
|
|
@ -215,7 +214,6 @@ void __init hlwd_pic_probe(void)
|
|||
irq_set_chained_handler(cascade_virq,
|
||||
hlwd_pic_irq_cascade);
|
||||
hlwd_irq_host = host;
|
||||
of_node_put(np);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue