aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-10-12 08:43:24 -0400
committerRob Herring <robh@kernel.org>2015-10-13 14:34:34 -0400
commit62ebf931935964230d6fe39026bc5fbcfac330d3 (patch)
tree65e14d3f406d5af6bd1e25862da09df09eeb187a
parent52493d446141b07c8ba28dd6a529513f8b2342bd (diff)
of/irq: fix guards for irq_of_parse_and_map prototype
Since OF is now a userselectable config symbol, having OF=y but OF_IRQ=n is a valid combination for non-OF platforms, and OF=y does not guarantee anymore that OF_IRQ is enabled (or we are building for SPARC). Fixes the following build error with OF=y, IRQ_DOMAIN=n and SPI=y: drivers/built-in.o: In function `spi_register_master': (.text+0xc3ae): undefined reference to `irq_of_parse_and_map' Makefile:935: recipe for target 'vmlinux' failed make: *** [vmlinux] Error 1 Signed-off-by: Jonas Gorski <jogo@openwrt.org> Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r--include/linux/of_irq.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index a58e2e51eeb2..580818d90475 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -70,7 +70,7 @@ static inline void of_msi_configure(struct device *dev, struct device_node *np)
70} 70}
71#endif 71#endif
72 72
73#if defined(CONFIG_OF) 73#if defined(CONFIG_OF_IRQ) || defined(CONFIG_SPARC)
74/* 74/*
75 * irq_of_parse_and_map() is used by all OF enabled platforms; but SPARC 75 * irq_of_parse_and_map() is used by all OF enabled platforms; but SPARC
76 * implements it differently. However, the prototype is the same for all, 76 * implements it differently. However, the prototype is the same for all,
@@ -78,7 +78,7 @@ static inline void of_msi_configure(struct device *dev, struct device_node *np)
78 */ 78 */
79extern unsigned int irq_of_parse_and_map(struct device_node *node, int index); 79extern unsigned int irq_of_parse_and_map(struct device_node *node, int index);
80 80
81#else /* !CONFIG_OF */ 81#else /* !CONFIG_OF && !CONFIG_SPARC */
82static inline unsigned int irq_of_parse_and_map(struct device_node *dev, 82static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
83 int index) 83 int index)
84{ 84{