[PATCH] of/irq: of_irq_init: add check for parent equal to child node

Subsystems: open firmware and flattened device tree, the rest

STALE5360d

3 messages, 3 authors, 2011-11-29 · open the first message on its own page

[PATCH] of/irq: of_irq_init: add check for parent equal to child node

From: Rob Herring <hidden>
Date: 2011-11-28 02:49:38

From: Rob Herring <redacted>

With the revert of "of/irq: of_irq_find_parent: check for parent equal to
child" (dc9372808412edb), we need another way to handle parent node equal
to the child node. This can simply be handled in of_irq_init by checking
for this condition.

Signed-off-by: Rob Herring <redacted>
---
 drivers/of/irq.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 791270b..19c0115 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -424,6 +424,8 @@ void __init of_irq_init(const struct of_device_id *matches)
 
 		desc->dev = np;
 		desc->interrupt_parent = of_irq_find_parent(np);
+		if (desc->interrupt_parent == np)
+			desc->interrupt_parent = NULL;
 		list_add_tail(&desc->list, &intc_desc_list);
 	}
 
-- 
1.7.5.4

Re: [PATCH] of/irq: of_irq_init: add check for parent equal to child node

From: Pawel Moll <hidden>
Date: 2011-11-28 10:54:58

On Sun, 2011-11-27 at 20:49 -0600, Rob Herring wrote:
From: Rob Herring <redacted>

With the revert of "of/irq: of_irq_find_parent: check for parent equal to
child" (dc9372808412edb), we need another way to handle parent node equal
to the child node. This can simply be handled in of_irq_init by checking
for this condition.

Signed-off-by: Rob Herring <redacted>
Works for me, thanks!

Tested-by: Pawel Moll <redacted>

Cheers!

Paweł

RE: [PATCH] of/irq: of_irq_init: add check for parent equal to child node

From: Stephen Warren <hidden>
Date: 2011-11-29 00:40:52

Rob Herring wrote at Sunday, November 27, 2011 7:49 PM:
From: Rob Herring <redacted>

With the revert of "of/irq: of_irq_find_parent: check for parent equal to
child" (dc9372808412edb), we need another way to handle parent node equal
to the child node. This can simply be handled in of_irq_init by checking
for this condition.

Signed-off-by: Rob Herring <redacted>
Tested-by: Stephen Warren <redacted>

This fixed the issue I was having testing a Tegra patch that converted
over to the new ARM GIC bindings.

-- 
nvpublic
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help