patch-2.3.16 linux/include/asm-arm/arch-ebsa285/io.h

Next file: linux/include/asm-arm/arch-ebsa285/irq.h
Previous file: linux/include/asm-arm/arch-arc/system.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.15/linux/include/asm-arm/arch-ebsa285/io.h linux/include/asm-arm/arch-ebsa285/io.h
@@ -62,6 +62,8 @@
  */
 #define IO_FUDGE_FACTOR		PCIMEM_BASE
 
+#define __pci_mem_addr(x)	((void *)(IO_FUDGE_FACTOR + (unsigned long)(x)))
+
 /*
  * ioremap takes a PCI memory address, as specified in
  * linux/Documentation/IO-mapping.txt
@@ -78,9 +80,7 @@
 
 #define ioremap_nocache(iomem_addr,size) ioremap((iomem_addr),(size))
 
-extern void iounmap(void *addr);
-
-#define __pci_mem_addr(x)	((void *)(IO_FUDGE_FACTOR + (unsigned long)(x)))
+#define iounmap(_addr)	do { __iounmap(__pci_mem_addr((_addr))); } while (0)
 
 #define readb(addr)	(*(volatile unsigned char *)__pci_mem_addr(addr))
 #define readw(addr)	(*(volatile unsigned short *)__pci_mem_addr(addr))

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)