From patchwork Fri Nov 9 16:19:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hunter, Jon" X-Patchwork-Id: 1721161 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 5E2CFDF264 for ; Fri, 9 Nov 2012 16:21:26 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TWrIo-0001Vf-Lw; Fri, 09 Nov 2012 16:19:30 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TWrIl-0001VO-2r for linux-arm-kernel@lists.infradead.org; Fri, 09 Nov 2012 16:19:27 +0000 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id qA9GJOBk020044; Fri, 9 Nov 2012 10:19:24 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qA9GJOgI002668; Fri, 9 Nov 2012 10:19:24 -0600 Received: from dlelxv23.itg.ti.com (172.17.1.198) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Fri, 9 Nov 2012 10:19:24 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id qA9GJOKn021613; Fri, 9 Nov 2012 10:19:24 -0600 Received: from localhost (h0-197.vpn.ti.com [172.24.0.197]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id qA9GJNw15822; Fri, 9 Nov 2012 10:19:23 -0600 (CST) From: Jon Hunter To: Tony Lindgren Subject: [PATCH] ARM: OMAP2+: Prevent redefinition errors for soc.h Date: Fri, 9 Nov 2012 10:19:21 -0600 Message-ID: <1352477961-7634-1-git-send-email-jon-hunter@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121109_111927_245831_BF6C6E82 X-CRM114-Status: UNSURE ( 9.10 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [198.47.26.152 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-omap , Jon Hunter , linux-arm 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: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org If the header soc.h is included more than once in a source (for example once directly by the source file and once indirectly by another header file), then the compiler will generate redefintion errors for the macros in soc.h. Prevent this by only allowing the content in soc.h to be included once. Signed-off-by: Jon Hunter --- Please note that I ran into this problem when rebasing my dmtimer fixes series [1] on Tony's Linux-OMAP master branch. I am including plat/cpu.h in dmtimer.h and I found several other files including dmtimer.h are also including soc.h and so generate a lot of errors. [1] http://marc.info/?l=linux-omap&m=135231490218361&w=2 arch/arm/mach-omap2/soc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h index 0700964..6b270a0 100644 --- a/arch/arm/mach-omap2/soc.h +++ b/arch/arm/mach-omap2/soc.h @@ -25,6 +25,9 @@ * */ +#ifndef __ARCH_ARM_MACH_OMAP2_SOC_H +#define __ARCH_ARM_MACH_OMAP2_SOC_H + #include "omap24xx.h" #include "omap34xx.h" #include "omap44xx.h" @@ -471,3 +474,4 @@ OMAP4_HAS_FEATURE(mpu_1_5ghz, MPU_1_5GHZ) #endif /* __ASSEMBLY__ */ +#endif /* __ARCH_ARM_MACH_OMAP2_SOC_H */