X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Farm%2Fmm%2Fioremap.c;h=00bb8fd37a59f1bcfdb92c0f60bb314c9b710f8a;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=e2daf066eced3f8295dd391e47997b9cf22286e1;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index e2daf066e..00bb8fd37 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -130,7 +130,7 @@ remap_area_pages(unsigned long start, unsigned long phys_addr, * 'flags' are the extra L_PTE_ flags that you want to specify for this * mapping. See include/asm-arm/proc-armv/pgtable.h for more information. */ -void * +void __iomem * __ioremap(unsigned long phys_addr, size_t size, unsigned long flags, unsigned long align) { @@ -148,7 +148,7 @@ __ioremap(unsigned long phys_addr, size_t size, unsigned long flags, */ offset = phys_addr & ~PAGE_MASK; phys_addr &= PAGE_MASK; - size = PAGE_ALIGN(last_addr) - phys_addr; + size = PAGE_ALIGN(last_addr + 1) - phys_addr; /* * Ok, go for it.. @@ -161,11 +161,11 @@ __ioremap(unsigned long phys_addr, size_t size, unsigned long flags, vfree(addr); return NULL; } - return (void *) (offset + (char *)addr); + return (void __iomem *) (offset + (char *)addr); } EXPORT_SYMBOL(__ioremap); -void __iounmap(void *addr) +void __iounmap(void __iomem *addr) { vfree((void *) (PAGE_MASK & (unsigned long) addr)); }