From patchwork Fri Jul 8 08:27:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/6] ARM: mxc: remove unnecessary header file inclusion from gpio.h Date: Thu, 07 Jul 2011 22:27:29 -0000 From: Shawn Guo X-Patchwork-Id: 103778 Message-Id: <1310113654-25887-2-git-send-email-shawn.guo@linaro.org> To: spi-devel-general@lists.sourceforge.net Cc: patches@linaro.org, devicetree-discuss@lists.ozlabs.org, Grant Likely , Shawn Guo , Sascha Hauer , linux-arm-kernel@lists.infradead.org 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"