ARM: io: simplify ioremap* and iounmap definitions
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 8 Dec 2010 13:57:48 +0000 (13:57 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 8 Dec 2010 13:58:24 +0000 (13:58 +0000)
We don't need to repeat the same definitions of the ioremap*(),
once in terms of __arch_ioremap() and again in terms of __arm_ioremap().
Instead, if the platform hasn't provided an __arch_ioremap, define
this to be __arm_ioremap, and only define the ioremap*() set using
__arch_ioremap.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/io.h

index 91be1f8c2d256d1d29c61a6caaf0e6b21672dc3b..20e0f7c9e03ed91678324170d8039ceadeea37a3 100644 (file)
@@ -241,18 +241,15 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
  *
  */
 #ifndef __arch_ioremap
-#define ioremap(cookie,size)           __arm_ioremap(cookie, size, MT_DEVICE)
-#define ioremap_nocache(cookie,size)   __arm_ioremap(cookie, size, MT_DEVICE)
-#define ioremap_cached(cookie,size)    __arm_ioremap(cookie, size, MT_DEVICE_CACHED)
-#define ioremap_wc(cookie,size)                __arm_ioremap(cookie, size, MT_DEVICE_WC)
-#define iounmap                                __iounmap
-#else
+#define __arch_ioremap                 __arm_ioremap
+#define __arch_iounmap                 __iounmap
+#endif
+
 #define ioremap(cookie,size)           __arch_ioremap((cookie), (size), MT_DEVICE)
 #define ioremap_nocache(cookie,size)   __arch_ioremap((cookie), (size), MT_DEVICE)
 #define ioremap_cached(cookie,size)    __arch_ioremap((cookie), (size), MT_DEVICE_CACHED)
 #define ioremap_wc(cookie,size)                __arch_ioremap((cookie), (size), MT_DEVICE_WC)
 #define iounmap                                __arch_iounmap
-#endif
 
 /*
  * io{read,write}{8,16,32} macros
This page took 0.024909 seconds and 5 git commands to generate.