From c50731ebca48c6216b183bd1e0272dd75033ba41 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 14 Jun 2022 11:15:55 +0200 Subject: dma: avoid clash between static inline and extern dma_alloc declarations dma_alloc/dma_sync/dma_free can be either either static inline definitions usually supplied per arch or extern definitions that can be either generic or supplied per arch. To avoid clashes, expect static inline definitions to define a preprocessor symbol for now. There is much duplication in the static inline helpers, which we can remove in future. Signed-off-by: Ahmad Fatoum Link: https://lore.barebox.org/20220614091556.1018102-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- arch/mips/include/asm/dma-mapping.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/mips') diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index 19d5b3f7bc..8e6ea08168 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h @@ -10,6 +10,7 @@ #include #include +#define dma_alloc_coherent dma_alloc_coherent static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle) { void *ret; @@ -26,6 +27,7 @@ static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle) return (void *)CKSEG1ADDR(ret); } +#define dma_free_coherent dma_free_coherent static inline void dma_free_coherent(void *vaddr, dma_addr_t dma_handle, size_t size) { -- cgit v1.2.3