From patchwork Fri Jul 8 08:27:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 956262 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p688HFXB029044 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 8 Jul 2011 08:17:36 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qf6FE-00085z-IP; Fri, 08 Jul 2011 08:17:05 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qf6FD-00066t-RK; Fri, 08 Jul 2011 08:17:03 +0000 Received: from mail-iy0-f177.google.com ([209.85.210.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qf6F0-00063w-MZ for linux-arm-kernel@lists.infradead.org; Fri, 08 Jul 2011 08:16:51 +0000 Received: by iyn15 with SMTP id 15so1888895iyn.36 for ; Fri, 08 Jul 2011 01:16:46 -0700 (PDT) Received: by 10.42.115.131 with SMTP id k3mr1876843icq.39.1310113005849; Fri, 08 Jul 2011 01:16:45 -0700 (PDT) Received: from localhost.localdomain ([114.218.200.65]) by mx.google.com with ESMTPS id s2sm10692207icw.17.2011.07.08.01.16.33 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jul 2011 01:16:44 -0700 (PDT) From: Shawn Guo To: spi-devel-general@lists.sourceforge.net Subject: [PATCH 1/6] ARM: mxc: remove unnecessary header file inclusion from gpio.h Date: Fri, 8 Jul 2011 16:27:29 +0800 Message-Id: <1310113654-25887-2-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1310113654-25887-1-git-send-email-shawn.guo@linaro.org> References: <1310113654-25887-1-git-send-email-shawn.guo@linaro.org> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110708_041650_929385_6247A158 X-CRM114-Status: GOOD ( 13.20 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.177 listed in list.dnswl.org] Cc: patches@linaro.org, devicetree-discuss@lists.ozlabs.org, Grant Likely , Shawn Guo , Sascha Hauer , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 08 Jul 2011 08:17:36 +0000 (UTC) The mach/gpio.h is included by asm/gpio.h, and in turn it gets included all over the place. Including unnecessary headers there brings indirect inclusion trouble. As an example, spi-imx calls cpu_is_mx21() but never explicitly includes mach/hardware.h. However it works because the header is included in mach/gpio.h. The patch cleans the unnecessary header file from mach/gpio.h, and includes headers explicitly where needed. Signed-off-by: Shawn Guo Cc: Grant Likely Cc: Sascha Hauer --- arch/arm/plat-mxc/include/mach/gpio.h | 2 -- drivers/spi/spi-imx.c | 1 + 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h index 31c820c..5bb02af 100644 --- a/arch/arm/plat-mxc/include/mach/gpio.h +++ b/arch/arm/plat-mxc/include/mach/gpio.h @@ -19,8 +19,6 @@ #ifndef __ASM_ARCH_MXC_GPIO_H__ #define __ASM_ARCH_MXC_GPIO_H__ -#include -#include #include diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 69d6dba..7097d43 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -36,6 +36,7 @@ #include #include +#include #define DRIVER_NAME "spi_imx"