Skip to content

Commit

Permalink
imx: properly protect mach/mx{1,[25][157x]}.h from multiple inclusion
Browse files Browse the repository at this point in the history
Some headers have used (now) wrong names or havn't had protection at
all.  This is needed before adding static inline functions to the
headers.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Magnus Lilja <lilja.magnus@gmail.com>
Cc: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Daniel Mack <daniel@caiaq.de>
  • Loading branch information
Uwe Kleine-König committed Jan 8, 2010
1 parent 4631166 commit 3cdd544
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 16 deletions.
6 changes: 3 additions & 3 deletions arch/arm/plat-mxc/include/mach/mx1.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* published by the Free Software Foundation.
*/

#ifndef __ASM_ARCH_MXC_MX1_H__
#define __ASM_ARCH_MXC_MX1_H__
#ifndef __MACH_MX1_H__
#define __MACH_MX1_H__

#include <mach/vmalloc.h>

Expand Down Expand Up @@ -161,4 +161,4 @@
#define DMA_REQ_UART1_T 30
#define DMA_REQ_UART1_R 31

#endif /* __ASM_ARCH_MXC_MX1_H__ */
#endif /* ifndef __MACH_MX1_H__ */
6 changes: 3 additions & 3 deletions arch/arm/plat-mxc/include/mach/mx21.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* MA 02110-1301, USA.
*/

#ifndef __ASM_ARCH_MXC_MX21_H__
#define __ASM_ARCH_MXC_MX21_H__
#ifndef __MACH_MX21_H__
#define __MACH_MX21_H__

#define MX21_AIPI_BASE_ADDR 0x10000000
#define MX21_AIPI_BASE_ADDR_VIRT 0xf4000000
Expand Down Expand Up @@ -219,4 +219,4 @@
#define DMA_REQ_BMI_RX MX21_DMA_REQ_BMI_RX
#endif

#endif /* __ASM_ARCH_MXC_MX21_H__ */
#endif /* ifndef __MACH_MX21_H__ */
2 changes: 1 addition & 1 deletion arch/arm/plat-mxc/include/mach/mx25.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@

#define MX25_INT_FEC 57

#endif /* __MACH_MX25_H__ */
#endif /* ifndef __MACH_MX25_H__ */
6 changes: 3 additions & 3 deletions arch/arm/plat-mxc/include/mach/mx27.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* MA 02110-1301, USA.
*/

#ifndef __ASM_ARCH_MXC_MX27_H__
#define __ASM_ARCH_MXC_MX27_H__
#ifndef __MACH_MX27_H__
#define __MACH_MX27_H__

#define MX27_AIPI_BASE_ADDR 0x10000000
#define MX27_AIPI_BASE_ADDR_VIRT 0xf4000000
Expand Down Expand Up @@ -300,4 +300,4 @@ extern int mx27_revision(void);
#define DMA_REQ_NFC MX27_DMA_REQ_NFC
#endif

#endif /* __ASM_ARCH_MXC_MX27_H__ */
#endif /* ifndef __MACH_MX27_H__ */
6 changes: 3 additions & 3 deletions arch/arm/plat-mxc/include/mach/mx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
* MA 02110-1301, USA.
*/

#ifndef __ASM_ARCH_MXC_MX2x_H__
#define __ASM_ARCH_MXC_MX2x_H__
#ifndef __MACH_MX2x_H__
#define __MACH_MX2x_H__

/* The following addresses are common between i.MX21 and i.MX27 */

Expand Down Expand Up @@ -290,4 +290,4 @@
#define DMA_REQ_CSI_RX MX2x_DMA_REQ_CSI_RX
#endif

#endif /* __ASM_ARCH_MXC_MX2x_H__ */
#endif /* ifndef __MACH_MX2x_H__ */
5 changes: 5 additions & 0 deletions arch/arm/plat-mxc/include/mach/mx31.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef __MACH_MX31_H__
#define __MACH_MX31_H__

/*
* IRAM
*/
Expand Down Expand Up @@ -225,3 +228,5 @@
#define MXC_INT_CCM MX31_INT_CCM
#define MXC_INT_PCMCIA MX31_INT_PCMCIA
#endif

#endif /* ifndef __MACH_MX31_H__ */
4 changes: 4 additions & 0 deletions arch/arm/plat-mxc/include/mach/mx35.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifndef __MACH_MX35_H__
#define __MACH_MX35_H__
/*
* IRAM
*/
Expand Down Expand Up @@ -204,3 +206,5 @@
#define MXC_INT_SPDIF MX35_INT_SPDIF
#define MXC_INT_FEC MX35_INT_FEC
#endif

#endif /* ifndef __MACH_MX35_H__ */
6 changes: 3 additions & 3 deletions arch/arm/plat-mxc/include/mach/mx3x.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* published by the Free Software Foundation.
*/

#ifndef __ASM_ARCH_MXC_MX31_H__
#define __ASM_ARCH_MXC_MX31_H__
#ifndef __MACH_MX3x_H__
#define __MACH_MX3x_H__

/*
* MX31 memory map:
Expand Down Expand Up @@ -404,4 +404,4 @@ static inline int mx31_revision(void)
#define SYSTEM_REV_NUM MX3x_SYSTEM_REV_NUM
#endif

#endif /* __ASM_ARCH_MXC_MX31_H__ */
#endif /* ifndef __MACH_MX3x_H__ */

0 comments on commit 3cdd544

Please sign in to comment.