From 6c583d0e327deecaea026cf47576fbe42274bd8c Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Thu, 5 Mar 2015 22:49:54 +0100 Subject: MIPS: change dma_alloc/free_coherent to common prototypes Signed-off-by: Lucas Stach Signed-off-by: Sascha Hauer --- arch/mips/include/asm/dma-mapping.h | 6 ++++-- arch/mips/include/asm/dma.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index 555efa5773..639511226d 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h @@ -12,12 +12,14 @@ static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle) ret = xmemalign(PAGE_SIZE, size); - *dma_handle = CPHYSADDR(ret); + if (dma_handle) + *dma_handle = CPHYSADDR(ret); return (void *)CKSEG1ADDR(ret); } -static inline void dma_free_coherent(void *vaddr) +static inline void dma_free_coherent(void *vaddr, dma_addr_t dma_handle, + size_t size) { free(vaddr); } diff --git a/arch/mips/include/asm/dma.h b/arch/mips/include/asm/dma.h index 27d269f491..30a58c78b9 100644 --- a/arch/mips/include/asm/dma.h +++ b/arch/mips/include/asm/dma.h @@ -8,6 +8,6 @@ #ifndef __ASM_DMA_H #define __ASM_DMA_H -/* empty */ +#include "asm/dma-mapping.h" #endif /* __ASM_DMA_H */ -- cgit v1.2.3