[PATCH 3/3] of/irq: fix guards for irq_of_parse_and_map prototype

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxx>
---
 include/linux/of_irq.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index d6a6d2e..3f92bf6 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -75,7 +75,7 @@ static inline void of_msi_configure(struct device *dev, struct device_node *np)
 }
 #endif
 
-#if defined(CONFIG_OF)
+#if defined(CONFIG_OF_IRQ) || defined(CONFIG_SPARC)
 /*
  * irq_of_parse_and_map() is used by all OF enabled platforms; but SPARC
  * implements it differently.  However, the prototype is the same for all,
@@ -83,7 +83,7 @@ static inline void of_msi_configure(struct device *dev, struct device_node *np)
  */
 extern unsigned int irq_of_parse_and_map(struct device_node *node, int index);
 
-#else /* !CONFIG_OF */
+#else /* !CONFIG_OF && !CONFIG_SPARC */
 static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
 						int index)
 {
-- 
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux