瀏覽代碼

sh: Fix up dma_is_consistent().

This fixes up the dma_is_consistent() definition for the various
coherence options.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt 15 年之前
父節點
當前提交
478fb15800
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      arch/sh/include/asm/dma-mapping.h

+ 5 - 0
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_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)
 #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)
 #define dma_is_consistent(d, h) (1)
+#else
+#define dma_is_consistent(d, h) (0)
+#endif
 
 
 static inline int dma_get_cache_alignment(void)
 static inline int dma_get_cache_alignment(void)
 {
 {