[PATCH] irqchip: Add irqchip_init dummy function

Bastian Hecht hechtb at gmail.com
Wed May 8 09:20:04 EDT 2013


We add an empty irqchip_init dummy function for cases in which
CONFIG_IRQCHIP is not used. In these cases irqchip.c is not compiled,
but a funtion call may still be present in architecture code, that in
runtime doesn't get hit.

E.g. this is needed in the arch/arm/mach-shmobile/intc-r8a7740.c
interrupt setup code where OF use and non OF us is both handled in one
file.

Signed-off-by: Bastian Hecht <hechtb+renesas at gmail.com>
---
 include/linux/irqchip.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h
index e0006f1..78527ba 100644
--- a/include/linux/irqchip.h
+++ b/include/linux/irqchip.h
@@ -11,6 +11,10 @@
 #ifndef _LINUX_IRQCHIP_H
 #define _LINUX_IRQCHIP_H
 
+#ifdef CONFIG_IRQCHIP
 void irqchip_init(void);
+#else
+void irqchip_init(void) {};
+#endif
 
 #endif
-- 
1.7.9.5




More information about the linux-arm-kernel mailing list