[PATCH] riscv: dma: rename dma_ops to dma_map_ops.

chalianis1 at gmail.com chalianis1 at gmail.com
Tue Sep 16 23:19:04 PDT 2025


From: Chali Anis <chalianis1 at gmail.com>

rename dma_ops to dma_map_ops for more consistence.

Signed-off-by: Chali Anis <chalianis1 at gmail.com>
---
 arch/riscv/cpu/dma.c              | 6 +++---
 arch/riscv/include/asm/dma.h      | 4 ++--
 drivers/soc/starfive/jh7100_dma.c | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/riscv/cpu/dma.c b/arch/riscv/cpu/dma.c
index b54b2fec1679..0a4b398c2e3c 100644
--- a/arch/riscv/cpu/dma.c
+++ b/arch/riscv/cpu/dma.c
@@ -30,14 +30,14 @@ static void __dma_free_coherent(struct device *dev,
 	free(vaddr);
 }
 
-static const struct dma_ops coherent_dma_ops = {
+static const struct dma_map_ops coherent_dma_ops = {
 	.alloc_coherent = __dma_alloc_coherent,
 	.free_coherent = __dma_free_coherent,
 	.flush_range = __dma_flush_range,
 	.inv_range = __dma_flush_range,
 };
 
-static const struct dma_ops *dma_ops = &coherent_dma_ops;
+static const struct dma_map_ops *dma_ops = &coherent_dma_ops;
 
 void *dma_alloc_coherent(struct device *dev,
 			 size_t size, dma_addr_t *dma_handle)
@@ -51,7 +51,7 @@ void dma_free_coherent(struct device *dev,
 	dma_ops->free_coherent(dev, vaddr, dma_handle, size);
 }
 
-void dma_set_ops(const struct dma_ops *ops)
+void dma_set_ops(const struct dma_map_ops *ops)
 {
 	dma_ops = ops;
 }
diff --git a/arch/riscv/include/asm/dma.h b/arch/riscv/include/asm/dma.h
index 190f8705e2ef..e3602b04397d 100644
--- a/arch/riscv/include/asm/dma.h
+++ b/arch/riscv/include/asm/dma.h
@@ -6,7 +6,7 @@
 
 struct device;
 
-struct dma_ops {
+struct dma_map_ops {
 	void *(*alloc_coherent)(struct device *dev, size_t size, dma_addr_t *dma_handle);
 	void (*free_coherent)(struct device *dev, void *vaddr, dma_addr_t dma_handle, size_t size);
 
@@ -15,7 +15,7 @@ struct dma_ops {
 };
 
 /* Override for SoCs with cache-incoherent DMA masters */
-void dma_set_ops(const struct dma_ops *ops);
+void dma_set_ops(const struct dma_map_ops *ops);
 
 #define DMA_ALIGNMENT 64
 
diff --git a/drivers/soc/starfive/jh7100_dma.c b/drivers/soc/starfive/jh7100_dma.c
index 1b1cafcba0fe..732dfacdb597 100644
--- a/drivers/soc/starfive/jh7100_dma.c
+++ b/drivers/soc/starfive/jh7100_dma.c
@@ -37,7 +37,7 @@ static inline void jh7100_free_coherent(struct device *dev,
 	free((void *)dma_handle);
 }
 
-static const struct dma_ops jh7100_dma_ops = {
+static const struct dma_map_ops jh7100_dma_ops = {
 	.alloc_coherent = jh7100_alloc_coherent,
 	.free_coherent = jh7100_free_coherent,
 	.flush_range = sifive_l2_flush64_range,
-- 
2.34.1




More information about the barebox mailing list