Skip to content

Commit d3b83dc

Browse files
Christoph Hellwigpaulburton
authored andcommitted
MIPS: remove the mips_dma_map_ops indirection
And use mips_default_dma_map_ops directly. Signed-off-by: Christoph Hellwig <hch@lst.de> Patchwork: https://patchwork.linux-mips.org/patch/19535/ Signed-off-by: Paul 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
1 parent f6d302e commit d3b83dc

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

arch/mips/include/asm/dma-mapping.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
#include <dma-coherence.h>
1111
#endif
1212

13-
extern const struct dma_map_ops *mips_dma_map_ops;
13+
extern const struct dma_map_ops mips_default_dma_map_ops;
1414
extern const struct dma_map_ops mips_swiotlb_ops;
1515

1616
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
1717
{
1818
#ifdef CONFIG_SWIOTLB
1919
return &mips_swiotlb_ops;
2020
#else
21-
return mips_dma_map_ops;
21+
return &mips_default_dma_map_ops;
2222
#endif
2323
}
2424

arch/mips/mm/dma-default.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static void mips_dma_cache_sync(struct device *dev, void *vaddr, size_t size,
384384
__dma_sync_virtual(vaddr, size, direction);
385385
}
386386

387-
static const struct dma_map_ops mips_default_dma_map_ops = {
387+
const struct dma_map_ops mips_default_dma_map_ops = {
388388
.alloc = mips_dma_alloc_coherent,
389389
.free = mips_dma_free_coherent,
390390
.mmap = mips_dma_mmap,
@@ -399,6 +399,4 @@ static const struct dma_map_ops mips_default_dma_map_ops = {
399399
.dma_supported = mips_dma_supported,
400400
.cache_sync = mips_dma_cache_sync,
401401
};
402-
403-
const struct dma_map_ops *mips_dma_map_ops = &mips_default_dma_map_ops;
404-
EXPORT_SYMBOL(mips_dma_map_ops);
402+
EXPORT_SYMBOL(mips_default_dma_map_ops);

0 commit comments

Comments
 (0)