]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 4073/1: Prevent s3c24xx drivers from including asm/arch/hardware.h and asm...
authorArnaud Patard <arnaud.patard@rtp-net.org>
Wed, 27 Dec 2006 21:56:44 +0000 (22:56 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 30 Dec 2006 17:05:07 +0000 (17:05 +0000)
As reminded in http://lkml.org/lkml/2006/12/23/26, one should use
asm/hardware.h and asm/irq.h but absent-minded devs like me tends to use
asm/arch/hardware.h and/or asm/arch/irqs.h.
This patch aims at preventing such things.

In order to make it work, I had to modify asm-arm/irq.h too so that it can
be included from assembly files.
Also, as a side effect, I had to modify some headers who were using the
asm/arch/hardware.h or asm/arch/irqs.h.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
include/asm-arm/arch-s3c2410/dma.h
include/asm-arm/arch-s3c2410/entry-macro.S
include/asm-arm/arch-s3c2410/hardware.h
include/asm-arm/arch-s3c2410/irqs.h
include/asm-arm/irq.h

index 7ac22483697130e6cdf7b57ccc9b3beac3376149..58ffa7ba3c88dc68728794225220f14f297cd7e7 100644 (file)
@@ -14,7 +14,7 @@
 #define __ASM_ARCH_DMA_H __FILE__
 
 #include <linux/sysdev.h>
-#include "hardware.h"
+#include <asm/hardware.h>
 
 /*
  * This is the maximum DMA address(physical address) that can be DMAd to.
index e09a6b8ec1535fc8929cd6a0ec4d1a82bc3528f8..1eb4e6b8d249c70ed2a53be4c7252aed5dbaf23c 100644 (file)
@@ -20,7 +20,7 @@
 #define INTOFFSET      (0x14)
 
 #include <asm/hardware.h>
-#include <asm/arch/irqs.h>
+#include <asm/irq.h>
 
        .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
 
index 729565e5cdf43bc35d505284b15b6e701406d5c8..6dadf58ff9847842c0644787f23a7e687f91d5d4 100644 (file)
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 
+#ifndef __ASM_HARDWARE_H
+#error "Do not include this directly, instead #include <asm/hardware.h>"
+#endif
+
 #ifndef __ASSEMBLY__
 
 /* external functions for GPIO support
index 39a69829d1636d67524a02f6b51872b1ddf9ac1e..4b7cff456c4e04f935acfb3b07f87554101d62b1 100644 (file)
@@ -12,6 +12,9 @@
 #ifndef __ASM_ARCH_IRQS_H
 #define __ASM_ARCH_IRQS_H __FILE__
 
+#ifndef __ASM_ARM_IRQ_H
+#error "Do not include this directly, instead #include <asm/irq.h>"
+#endif
 
 /* we keep the first set of CPU IRQs out of the range of
  * the ISA space, so that the PC104 has them to itself
index 283af50a16cb359e7ee0709a0d81efb982cc952f..1b882a255e3515861f9fe58a6112ca747ad54ec3 100644 (file)
@@ -19,7 +19,6 @@
 #define NO_IRQ ((unsigned int)(-1))
 #endif
 
-struct irqaction;
 
 /*
  * Migration helpers
@@ -37,6 +36,10 @@ struct irqaction;
 #define IRQT_HIGH      (__IRQT_HIGHLVL)
 #define IRQT_PROBE     IRQ_TYPE_PROBE
 
+#ifndef __ASSEMBLY__
+struct irqaction;
 extern void migrate_irqs(void);
 #endif
 
+#endif
+