# \[PATCH 1/8\] of/irq: Create stub for of\_irq\_find\_parent when !CONFIG\_OF

- From: Lee Jones \<hidden\>
- Date: 2012-08-09 15:54:08 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2012/08/3906109
- Thread: https://ratatoskr.run/linux-arm-kernel/2012/08/3906104/t.md

```text
of_irq_find_parent is a handy function to use outside the confines of
the Open Firmware subsystem. One such use-case is when the IRQ Domain
wishes to find an IRQ domain for a given device node. Currently it can
not take any notice of the 'interrupt-parent' property. Instead it
just uses the first IRQ controller as it climbs the Device Tree. If
we were to use this as a precursor the resultant controller is more
likely to be correct.

CC: Rob Herring <redacted>
CC: devicetree-discuss at lists.ozlabs.org
Signed-off-by: Lee Jones <redacted>
---
 include/linux/of_irq.h |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index 1717cd9..b8e2411 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -83,6 +83,11 @@ static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
 {
 	return 0;
 }
+
+static inline void *of_irq_find_parent(struct device_node *child)
+{
+	return NULL;
+}
 #endif /* !CONFIG_OF */
 
 #endif /* __OF_IRQ_H */
-- 
1.7.9.5
```
