summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/include/stdlib.h2
-rw-r--r--payloads/libpayload/libc/malloc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/payloads/libpayload/include/stdlib.h b/payloads/libpayload/include/stdlib.h
index 18f1dca8a4..ac386c1fa2 100644
--- a/payloads/libpayload/include/stdlib.h
+++ b/payloads/libpayload/include/stdlib.h
@@ -136,7 +136,7 @@ void print_malloc_map(void);
void init_dma_memory(void *start, u32 size);
int dma_initialized(void);
-int dma_coherent(void *ptr);
+int dma_coherent(const void *ptr);
static inline void *xmalloc_work(size_t size, const char *file,
const char *func, int line)
diff --git a/payloads/libpayload/libc/malloc.c b/payloads/libpayload/libc/malloc.c
index 20f9ef38e1..f94f33e5df 100644
--- a/payloads/libpayload/libc/malloc.c
+++ b/payloads/libpayload/libc/malloc.c
@@ -118,7 +118,7 @@ int dma_initialized()
}
/* For boards that don't initialize DMA we assume all locations are coherent */
-int dma_coherent(void *ptr)
+int dma_coherent(const void *ptr)
{
return !dma_initialized() || (dma->start <= ptr && dma->end > ptr);
}