From 478fb158005b55c8484f23a6beb1b69f5a612162 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 27 Oct 2009 10:41:58 +0900 Subject: [PATCH] sh: Fix up dma_is_consistent(). This fixes up the dma_is_consistent() definition for the various coherence options. Signed-off-by: Paul Mundt --- arch/sh/include/asm/dma-mapping.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/sh/include/asm/dma-mapping.h b/arch/sh/include/asm/dma-mapping.h index 6530760..87ced13 100644 --- a/arch/sh/include/asm/dma-mapping.h +++ b/arch/sh/include/asm/dma-mapping.h @@ -41,7 +41,12 @@ void dma_cache_sync(struct device *dev, void *vaddr, size_t size, #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) + +#ifdef CONFIG_DMA_COHERENT #define dma_is_consistent(d, h) (1) +#else +#define dma_is_consistent(d, h) (0) +#endif static inline int dma_get_cache_alignment(void) { -- 2.7.4