lkml.org 
[lkml]   [2015]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/4] xtensa: fix errors with dma_supported
Date
commit eec17ba9f049 ("dma-mapping: consolidate dma_supported") has
removed dma_supported() from individual arch files to
asm-generic/dma-mapping-common.h or if arch has its own implementation
then we need to set the flag HAVE_ARCH_DMA_SUPPORTED. Otherwise we were
getting error like:
error: redefinition of 'dma_supported'
while building with allmodconfig.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
arch/xtensa/include/asm/dma-mapping.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h
index 5762d8d..019a94a 100644
--- a/arch/xtensa/include/asm/dma-mapping.h
+++ b/arch/xtensa/include/asm/dma-mapping.h
@@ -30,10 +30,7 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
return &xtensa_dma_map_ops;
}

-#include <asm-generic/dma-mapping-common.h>
-
-#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_attrs(d, s, h, f, NULL)
-#define dma_free_noncoherent(d, s, v, h) dma_free_attrs(d, s, v, h, NULL)
+#define HAVE_ARCH_DMA_SUPPORTED 1

static inline int
dma_supported(struct device *dev, u64 mask)
@@ -41,6 +38,11 @@ dma_supported(struct device *dev, u64 mask)
return 1;
}

+#include <asm-generic/dma-mapping-common.h>
+
+#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_attrs(d, s, h, f, NULL)
+#define dma_free_noncoherent(d, s, v, h) dma_free_attrs(d, s, v, h, NULL)
+
static inline int
dma_set_mask(struct device *dev, u64 mask)
{
--
1.9.1


\
 
 \ /
  Last update: 2015-09-08 15:41    [W:1.519 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site