]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: integrator: fix build with INTEGRATOR_AP off
authorArnd Bergmann <arnd@arndb.de>
Thu, 14 Feb 2013 12:43:29 +0000 (13:43 +0100)
committerArnd Bergmann <arnd@arndb.de>
Thu, 14 Feb 2013 14:04:38 +0000 (15:04 +0100)
The conditional declaration of ap_uart_data is broken
and causes this build error:

In file included from arch/arm/mach-integrator/core.c:35:0:
arch/arm/mach-integrator/common.h:6:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

Turning the check into an constant-expression if(IS_ENABLED()) statement
creates more readable code and solves this problem as well.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
arch/arm/mach-integrator/common.h
arch/arm/mach-integrator/core.c

index 79197d8b34aa1b013e6fb6125017ec5921413410..72516658be1e6965d7f37d39b7feeff957690575 100644 (file)
@@ -1,10 +1,5 @@
 #include <linux/amba/serial.h>
-#ifdef CONFIG_ARCH_INTEGRATOR_AP
 extern struct amba_pl010_data ap_uart_data;
-#else
-/* Not used without Integrator/AP support anyway */
-struct amba_pl010_data ap_uart_data {};
-#endif
 void integrator_init_early(void);
 int integrator_init(bool is_cp);
 void integrator_reserve(void);
index 39c060f75e470b79136cf3cdf3bc2c4f603d63b5..81461d218717495b44de65136be0f6be946add32 100644 (file)
@@ -71,7 +71,7 @@ int __init integrator_init(bool is_cp)
         * hard-code them. The Integator/CP and forward have proper cell IDs.
         * Else we leave them undefined to the bus driver can autoprobe them.
         */
-       if (!is_cp) {
+       if (!is_cp && IS_ENABLED(CONFIG_ARCH_INTEGRATOR_AP)) {
                rtc_device.periphid     = 0x00041030;
                uart0_device.periphid   = 0x00041010;
                uart1_device.periphid   = 0x00041010;