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>
This commit is contained in:
parent
bf64035a15
commit
66bd1cff90
|
@ -58,7 +58,7 @@ void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
|
||||||
return (void *)(gd->arch.ram_buf + paddr);
|
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;
|
return (u8 *)ptr - gd->arch.ram_buf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue