Skip to content

Commit

Permalink
[ARM] fix OMAP include loops
Browse files Browse the repository at this point in the history
OMAP has two include loops in its header files:

  asm-arm/hardware.h <- asm-arm/arch-omap/io.h <-
   asm-arm/arch-omap/hardware.h <- asm-arm/hardware.h

  asm-arm/arch-omap/board-palmte.h <-
   asm-arm/arch-omap/hardware.h <- asm-arm/hardware.h <-
   asm-arm/arch-omap/gpio.h <- asm-arm/arch-omap/board-palmte.h

Circular include dependencies are dangerous since they can result in
inconsistent definitions being provided to other code, especially if
'#ifndef' constructs are used.

Solve these by removing the offending includes, and add additional
includes where necessary.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed May 23, 2008
1 parent 2a740d7 commit cfb41bf
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions include/asm-arm/arch-omap/board-palmte.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#ifndef __OMAP_BOARD_PALMTE_H
#define __OMAP_BOARD_PALMTE_H

#include <asm/arch/gpio.h>

#define PALMTE_USBDETECT_GPIO 0
#define PALMTE_USB_OR_DC_GPIO 1
#define PALMTE_TSC_GPIO 4
Expand Down
1 change: 1 addition & 0 deletions include/asm-arm/arch-omap/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* warranty of any kind, whether express or implied.
*/
#include <asm/hardware.h>
#include <asm/arch/io.h>
#include <asm/arch/irqs.h>

#if defined(CONFIG_ARCH_OMAP1)
Expand Down
1 change: 0 additions & 1 deletion include/asm-arm/arch-omap/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#ifndef __ASM_ARCH_OMAP_GPIO_H
#define __ASM_ARCH_OMAP_GPIO_H

#include <asm/hardware.h>
#include <asm/arch/irqs.h>
#include <asm/io.h>

Expand Down
1 change: 0 additions & 1 deletion include/asm-arm/arch-omap/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <asm/types.h>
#include <asm/arch/cpu.h>
#endif
#include <asm/arch/io.h>
#include <asm/arch/serial.h>

/*
Expand Down

0 comments on commit cfb41bf

Please sign in to comment.