[PATCH] ARM: shmobile: don't call irqchip_init unconditionally

From: Arnd Bergmann
Date: Thu Apr 25 2013 - 13:28:46 EST


The irqchip_init function is only available when building
with CONFIG_OF enabled, which causes this build failure for
bonito_defconfig:

arch/arm/mach-shmobile/built-in.o: In function `r8a7740_init_irq_of':
:(.init.text+0x580): undefined reference to `irqchip_init'

This makes the OF portion of the driver conditional, which avoids
the build error and also results in smaller object code OF is disabled,
without the need for an #ifdef.

Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Bastian Hecht <hechtb+renesas@xxxxxxxxx>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
[horms+renesas@xxxxxxxxxxxx: Remove ATAGS portion which causes boot failure]
Signed-off-by: Simon Horman <horms+renesas@xxxxxxxxxxxx>
---
arch/arm/mach-shmobile/intc-r8a7740.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-shmobile/intc-r8a7740.c b/arch/arm/mach-shmobile/intc-r8a7740.c
index 8871f77..61e2a21 100644
--- a/arch/arm/mach-shmobile/intc-r8a7740.c
+++ b/arch/arm/mach-shmobile/intc-r8a7740.c
@@ -53,6 +53,9 @@ static void __init r8a7740_init_irq_common(void)

void __init r8a7740_init_irq_of(void)
{
+ if (!IS_ENABLED(CONFIG_OF))
+ return;
+
irqchip_init();
r8a7740_init_irq_common();
}
--
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/