]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
of/irq: Create stub for of_irq_find_parent when !CONFIG_OF
authorLee Jones <lee.jones@linaro.org>
Wed, 8 Aug 2012 12:44:59 +0000 (13:44 +0100)
committerLee Jones <lee.jones@linaro.org>
Thu, 20 Sep 2012 10:32:30 +0000 (12:32 +0200)
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.

Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
include/linux/of_irq.h

index 1717cd935e1c9233b8c868dfb3fe57306ee992a1..b8e241125201d6a4ed29bfb30fded26e5d711654 100644 (file)
@@ -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 */