1
0
Fork 0

Use a const pointer for map_to_sysmem()

This function does not actually change the pointer contents, so use const
so that functions which have a const pointer do not need to cast.

Signed-off-by: Simon Glass <sjg@chromium.org>
utp
Simon Glass 2014-02-27 13:25:55 -07:00
parent bf64035a15
commit 66bd1cff90
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
return (void *)(gd->arch.ram_buf + paddr);
}
phys_addr_t map_to_sysmem(void *ptr)
phys_addr_t map_to_sysmem(const void *ptr)
{
return (u8 *)ptr - gd->arch.ram_buf;
}