[PATCH] arm: it's OK to pass pointer to volatile as iounmap() argument...
authorAl Viro <viro@ftp.linux.org.uk>
Mon, 9 Oct 2006 01:09:49 +0000 (02:09 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Oct 2006 01:50:58 +0000 (18:50 -0700)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/arm/mm/ioremap.c
include/asm-arm/io.h

index 591fc3187c7fc8edcde66091ed855647b250a56d..46544059279132efb3b3112f95929912f700f004 100644 (file)
@@ -361,14 +361,14 @@ __ioremap(unsigned long phys_addr, size_t size, unsigned long flags)
 }
 EXPORT_SYMBOL(__ioremap);
 
-void __iounmap(void __iomem *addr)
+void __iounmap(volatile void __iomem *addr)
 {
 #ifndef CONFIG_SMP
        struct vm_struct **p, *tmp;
 #endif
        unsigned int section_mapping = 0;
 
-       addr = (void __iomem *)(PAGE_MASK & (unsigned long)addr);
+       addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long)addr);
 
 #ifndef CONFIG_SMP
        /*
@@ -395,6 +395,6 @@ void __iounmap(void __iomem *addr)
 #endif
 
        if (!section_mapping)
-               vunmap(addr);
+               vunmap((void __force *)addr);
 }
 EXPORT_SYMBOL(__iounmap);
index 8076a85c367541479c6e6aaa4dd54e358cb3ba6f..34aaaac4f6177be0feabab55bfe1f3e7869d8286 100644 (file)
@@ -63,7 +63,7 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);
  */
 extern void __iomem * __ioremap_pfn(unsigned long, unsigned long, size_t, unsigned long);
 extern void __iomem * __ioremap(unsigned long, size_t, unsigned long);
-extern void __iounmap(void __iomem *addr);
+extern void __iounmap(volatile void __iomem *addr);
 
 /*
  * Bad read/write accesses...