]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sandbox: Make map_to_sysmem() use a constant pointer
authorSimon Glass <sjg@chromium.org>
Thu, 7 Nov 2013 16:31:58 +0000 (09:31 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 21 Nov 2013 23:54:26 +0000 (16:54 -0700)
Very often a constant pointer is passed to this function, so we should
declare this, since map_to_sysmem() does not change the pointer.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/include/asm/io.h
include/common.h

index 9ac6a5f00dd7927f68df88601b205c0557b7e073..7956041171f52beaaeb5b263da17926414d5dcdd 100644 (file)
@@ -38,6 +38,6 @@ static inline void unmap_sysmem(const void *vaddr)
 }
 
 /* Map from a pointer to our RAM buffer */
-phys_addr_t map_to_sysmem(void *ptr);
+phys_addr_t map_to_sysmem(const void *ptr);
 
 #endif
index 409515f4989ce5cee3b382d0c2f4ecc370b1e5a2..8ca67f64facf6d8c1a330a343366749ec34077b5 100644 (file)
@@ -923,7 +923,7 @@ static inline void unmap_sysmem(const void *vaddr)
 {
 }
 
-static inline phys_addr_t map_to_sysmem(void *ptr)
+static inline phys_addr_t map_to_sysmem(const void *ptr)
 {
        return (phys_addr_t)(uintptr_t)ptr;
 }