From patchwork Thu Feb 14 13:49:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2141961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id A31E53FCFC for ; Thu, 14 Feb 2013 13:53:57 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U5zDk-0006Uq-E1; Thu, 14 Feb 2013 13:51:28 +0000 Received: from moutng.kundenserver.de ([212.227.17.9]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U5zBx-0005jE-LW for linux-arm-kernel@lists.infradead.org; Thu, 14 Feb 2013 13:49:41 +0000 Received: from wuerfel.lan (HSI-KBW-46-223-90-92.hsi.kabel-badenwuerttemberg.de [46.223.90.92]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0M9vlQ-1UCXgo2DfM-00BFr7; Thu, 14 Feb 2013 14:49:30 +0100 From: Arnd Bergmann To: arm@kernel.org Subject: [PATCH 07/11] ARM: integrator: fix build with INTEGRATOR_AP off Date: Thu, 14 Feb 2013 14:49:23 +0100 Message-Id: <1360849767-1463135-8-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1360849767-1463135-1-git-send-email-arnd@arndb.de> References: <1360849767-1463135-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:Zh8zwQxgevF/LpXRyR/Lf06SrTjGTklU+3YPKEcRkLo FR6HhUmtoVuagev8og9FAvXBn1bCTPWgIG0kWkYo6h0eywuhtG JWlptfW9UTpLZb1CLxDNqu18OnhBPybOpdwNbLYBH+g/OHyWUd oksy4pGqVro5Xixt9pCeYYYVaYrKfEGyWnaH9EHJtUliv8/b7H Va1uPYqTFF/7i7kT1uZZQdKeNf/GZ720WWZF/rIn1+q01JMf3P 8L5ABRyjcWHO0Mv2+1II9/aYTKniKVB48K7P0jADDhtHzdA7oH iNgQBfK2kTBTHudGtOJktS14i1QVFW22ZvG6/NmReziR01inxo /KgnpOillew1AenIjHI5ejluovX5Doipg5D5o7Izc X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130214_084938_188302_0EB6C00F X-CRM114-Status: GOOD ( 11.09 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.9 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Arnd Bergmann , Linus Walleij , Russell King , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 Cc: Russell King Reviewed-by: Linus Walleij --- arch/arm/mach-integrator/common.h | 5 ----- arch/arm/mach-integrator/core.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-integrator/common.h index 79197d8..72516658b 100644 --- a/arch/arm/mach-integrator/common.h +++ b/arch/arm/mach-integrator/common.h @@ -1,10 +1,5 @@ #include -#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); diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 39c060f..81461d2 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c @@ -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;