openrisc: io: Fixup defines and move include to the end
authorStafford Horne <shorne@gmail.com>
Mon, 3 Aug 2020 23:40:57 +0000 (08:40 +0900)
committerStafford Horne <shorne@gmail.com>
Wed, 5 Aug 2020 21:01:47 +0000 (06:01 +0900)
This didn't seem to cause any issues, but while working on fixing up
sparse annotations for OpenRISC I noticed this.  This patch moves the
include of asm-generic/io.h to the end of the file.  Also, we add
defines of ioremap and iounmap, that way we don't get duplicate
definitions from asm-generic/io.h.

Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/include/asm/io.h

index db02fb2077d92c35ef909ca9802d255fb8671edb..7d6b4a77b379d8e2f14aeb862128e481e8b20850 100644 (file)
@@ -14,6 +14,8 @@
 #ifndef __ASM_OPENRISC_IO_H
 #define __ASM_OPENRISC_IO_H
 
+#include <linux/types.h>
+
 /*
  * PCI: can we really do 0 here if we have no port IO?
  */
 #define PIO_OFFSET             0
 #define PIO_MASK               0
 
-#include <asm-generic/io.h>
-
+#define ioremap ioremap
 void __iomem *ioremap(phys_addr_t offset, unsigned long size);
+
+#define iounmap iounmap
 extern void iounmap(void *addr);
 
+#include <asm-generic/io.h>
+
 #endif