[4/5] m68k/io: Move mem*io define guards to <asm/kmap.h>
diff mbox series

Message ID 20180709093040.23597-5-geert@linux-m68k.org
State New, archived
Headers show
  • m68k: IO Fixes and Cleanups
Related show

Commit Message

Geert Uytterhoeven July 9, 2018, 9:30 a.m. UTC
The mem*io define guards are applicable to all users of <asm/kmap.h>.
Hence move them, and drop the #ifdef.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
To avoid redefined warnings, this depends on "net: mac8390: Use standard

  - No changes.
 arch/m68k/include/asm/io_no.h | 11 -----------
 arch/m68k/include/asm/kmap.h  |  3 +++
 2 files changed, 3 insertions(+), 11 deletions(-)

diff mbox series

diff --git a/arch/m68k/include/asm/io_no.h b/arch/m68k/include/asm/io_no.h
index 83a0a6d449f44bdd..c207428fae5953e7 100644
--- a/arch/m68k/include/asm/io_no.h
+++ b/arch/m68k/include/asm/io_no.h
@@ -131,17 +131,6 @@  static inline void writel(u32 value, volatile void __iomem *addr)
 #endif /* CONFIG_PCI */
- * These are defined in kmap.h as static inline functions. To maintain
- * previous behavior we put these define guards here so io_mm.h doesn't
- * see them.
- */
-#ifdef CONFIG_MMU
-#define memset_io memset_io
-#define memcpy_fromio memcpy_fromio
-#define memcpy_toio memcpy_toio
 #include <asm/kmap.h>
 #include <asm/virtconvert.h>
 #include <asm-generic/io.h>
diff --git a/arch/m68k/include/asm/kmap.h b/arch/m68k/include/asm/kmap.h
index 608e12f058a7cd7d..aac7f045f7f0aa85 100644
--- a/arch/m68k/include/asm/kmap.h
+++ b/arch/m68k/include/asm/kmap.h
@@ -50,18 +50,21 @@  static inline void __iomem *ioremap_fullcache(unsigned long physaddr,
 	return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
+#define memset_io memset_io
 static inline void memset_io(volatile void __iomem *addr, unsigned char val,
 			     int count)
 	__builtin_memset((void __force *) addr, val, count);
+#define memcpy_fromio memcpy_fromio
 static inline void memcpy_fromio(void *dst, const volatile void __iomem *src,
 				 int count)
 	__builtin_memcpy(dst, (void __force *) src, count);
+#define memcpy_toio memcpy_toio
 static inline void memcpy_toio(volatile void __iomem *dst, const void *src,
 			       int count)