aboutsummaryrefslogtreecommitdiff
path: root/include/asm-generic/io.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-10-16 08:09:38 +0200
committerChristoph Hellwig <hch@lst.de>2019-11-11 21:18:19 +0100
commitd092a87073269677b7ff09e71a8d91912b7f969a (patch)
treee86ed34b3710397845f249bf12ff9ef88463df20 /include/asm-generic/io.h
parent97c9801a15e5b0c9a20e495b2ccabf010894e74b (diff)
arch: rely on asm-generic/io.h for default ioremap_* definitions
Various architectures that use asm-generic/io.h still defined their own default versions of ioremap_nocache, ioremap_wt and ioremap_wc that point back to plain ioremap directly or indirectly. Remove these definitions and rely on asm-generic/io.h instead. For this to work the backup ioremap_* defintions needs to be changed to purely cpp macros instea of inlines to cover for architectures like openrisc that only define ioremap after including <asm-generic/io.h>. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Palmer Dabbelt <palmer@dabbelt.com>
Diffstat (limited to 'include/asm-generic/io.h')
-rw-r--r--include/asm-generic/io.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index ed74d2e9af75..bd676f21b5bd 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -949,27 +949,15 @@ static inline void iounmap(void __iomem *addr)
#endif /* CONFIG_MMU */
#ifndef ioremap_nocache
-#define ioremap_nocache ioremap_nocache
-static inline void __iomem *ioremap_nocache(phys_addr_t offset, size_t size)
-{
- return ioremap(offset, size);
-}
+#define ioremap_nocache ioremap
#endif
#ifndef ioremap_wc
-#define ioremap_wc ioremap_wc
-static inline void __iomem *ioremap_wc(phys_addr_t offset, size_t size)
-{
- return ioremap_nocache(offset, size);
-}
+#define ioremap_wc ioremap
#endif
#ifndef ioremap_wt
-#define ioremap_wt ioremap_wt
-static inline void __iomem *ioremap_wt(phys_addr_t offset, size_t size)
-{
- return ioremap_nocache(offset, size);
-}
+#define ioremap_wt ioremap
#endif
/*