Commit d3b83dcc authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Paul Burton

MIPS: remove the mips_dma_map_ops indirection

And use mips_default_dma_map_ops directly.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Patchwork: https://patchwork.linux-mips.org/patch/19535/Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Tom Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: iommu@lists.linux-foundation.org
Cc: linux-mips@linux-mips.org
parent f6d302e3
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <dma-coherence.h> #include <dma-coherence.h>
#endif #endif
extern const struct dma_map_ops *mips_dma_map_ops; extern const struct dma_map_ops mips_default_dma_map_ops;
extern const struct dma_map_ops mips_swiotlb_ops; extern const struct dma_map_ops mips_swiotlb_ops;
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
...@@ -18,7 +18,7 @@ static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) ...@@ -18,7 +18,7 @@ static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
#ifdef CONFIG_SWIOTLB #ifdef CONFIG_SWIOTLB
return &mips_swiotlb_ops; return &mips_swiotlb_ops;
#else #else
return mips_dma_map_ops; return &mips_default_dma_map_ops;
#endif #endif
} }
......
...@@ -384,7 +384,7 @@ static void mips_dma_cache_sync(struct device *dev, void *vaddr, size_t size, ...@@ -384,7 +384,7 @@ static void mips_dma_cache_sync(struct device *dev, void *vaddr, size_t size,
__dma_sync_virtual(vaddr, size, direction); __dma_sync_virtual(vaddr, size, direction);
} }
static const struct dma_map_ops mips_default_dma_map_ops = { const struct dma_map_ops mips_default_dma_map_ops = {
.alloc = mips_dma_alloc_coherent, .alloc = mips_dma_alloc_coherent,
.free = mips_dma_free_coherent, .free = mips_dma_free_coherent,
.mmap = mips_dma_mmap, .mmap = mips_dma_mmap,
...@@ -399,6 +399,4 @@ static const struct dma_map_ops mips_default_dma_map_ops = { ...@@ -399,6 +399,4 @@ static const struct dma_map_ops mips_default_dma_map_ops = {
.dma_supported = mips_dma_supported, .dma_supported = mips_dma_supported,
.cache_sync = mips_dma_cache_sync, .cache_sync = mips_dma_cache_sync,
}; };
EXPORT_SYMBOL(mips_default_dma_map_ops);
const struct dma_map_ops *mips_dma_map_ops = &mips_default_dma_map_ops;
EXPORT_SYMBOL(mips_dma_map_ops);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment