mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: chalianis1@gmail.com
To: s.hauer@pengutronix.de
Cc: barebox@lists.infradead.org, Chali Anis <chalianis1@gmail.com>
Subject: [PATCH] drivers: dma: refactor: rename dma_ops to dma_device_ops.
Date: Sun, 14 Sep 2025 15:32:49 -0400	[thread overview]
Message-ID: <20250914193249.23414-1-chalianis1@gmail.com> (raw)

From: Chali Anis <chalianis1@gmail.com>

This patch is an esthetic cleanup, rename the dma_ops to dma_device_ops
to be sure that the struct in drivers/dma is different from one used in
arch/riscv/cpu. I accidentally faced the issue telling that the struct is
defined in the two places but it is not supposed to happen since the
the driver is never selected from riscv.

Signed-off-by: Chali Anis <chalianis1@gmail.com>
---
 drivers/dma/dma-devices.c      | 18 +++++++++---------
 drivers/dma/ti/k3-udma-am62l.c |  2 +-
 drivers/dma/ti/k3-udma.c       |  2 +-
 include/dma-devices.h          |  4 ++--
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/dma/dma-devices.c b/drivers/dma/dma-devices.c
index a8b8086d5f86..43e585175a94 100644
--- a/drivers/dma/dma-devices.c
+++ b/drivers/dma/dma-devices.c
@@ -35,7 +35,7 @@ static int dma_of_xlate_default(struct dma *dma,
 
 static int dma_request(struct device *dev, struct dma *dma)
 {
-	const struct dma_ops *ops = dma->dmad->ops;
+	const struct dma_device_ops *ops = dma->dmad->ops;
 
 	dev_dbg(dma->dev, "%s(dev=%p, dma=%p)\n", __func__, dev, dma);
 
@@ -61,7 +61,7 @@ struct dma *dma_get_by_index(struct device *dev, int index)
 {
 	int ret;
 	struct of_phandle_args args;
-	const struct dma_ops *ops;
+	const struct dma_device_ops *ops;
 	struct dma *dma;
 	struct dma_device *dmad;
 
@@ -120,7 +120,7 @@ struct dma *dma_get_by_name(struct device *dev, const char *name)
 
 int dma_release(struct dma *dma)
 {
-	const struct dma_ops *ops = dma->dmad->ops;
+	const struct dma_device_ops *ops = dma->dmad->ops;
 
 	dev_dbg(dma->dev, "%s(dma=%p)\n", __func__, dma);
 
@@ -132,7 +132,7 @@ int dma_release(struct dma *dma)
 
 int dma_enable(struct dma *dma)
 {
-	const struct dma_ops *ops = dma->dmad->ops;
+	const struct dma_device_ops *ops = dma->dmad->ops;
 
 	dev_dbg(dma->dev, "%s(dma=%p)\n", __func__, dma);
 
@@ -144,7 +144,7 @@ int dma_enable(struct dma *dma)
 
 int dma_disable(struct dma *dma)
 {
-	const struct dma_ops *ops = dma->dmad->ops;
+	const struct dma_device_ops *ops = dma->dmad->ops;
 
 	dev_dbg(dma->dev, "%s(dma=%p)\n", __func__, dma);
 
@@ -156,7 +156,7 @@ int dma_disable(struct dma *dma)
 
 int dma_prepare_rcv_buf(struct dma *dma, dma_addr_t dst, size_t size)
 {
-	const struct dma_ops *ops = dma->dmad->ops;
+	const struct dma_device_ops *ops = dma->dmad->ops;
 
 	dev_vdbg(dma->dev, "%s(dma=%p)\n", __func__, dma);
 
@@ -168,7 +168,7 @@ int dma_prepare_rcv_buf(struct dma *dma, dma_addr_t dst, size_t size)
 
 int dma_receive(struct dma *dma, dma_addr_t *dst, void *metadata)
 {
-	const struct dma_ops *ops = dma->dmad->ops;
+	const struct dma_device_ops *ops = dma->dmad->ops;
 
 	dev_vdbg(dma->dev, "%s(dma=%p)\n", __func__, dma);
 
@@ -180,7 +180,7 @@ int dma_receive(struct dma *dma, dma_addr_t *dst, void *metadata)
 
 int dma_send(struct dma *dma, dma_addr_t src, size_t len, void *metadata)
 {
-	const struct dma_ops *ops = dma->dmad->ops;
+	const struct dma_device_ops *ops = dma->dmad->ops;
 
 	dev_vdbg(dma->dev, "%s(dma=%p)\n", __func__, dma);
 
@@ -192,7 +192,7 @@ int dma_send(struct dma *dma, dma_addr_t src, size_t len, void *metadata)
 
 int dma_get_cfg(struct dma *dma, u32 cfg_id, void **cfg_data)
 {
-	const struct dma_ops *ops = dma->dmad->ops;
+	const struct dma_device_ops *ops = dma->dmad->ops;
 
 	dev_dbg(dma->dev, "%s(dma=%p)\n", __func__, dma);
 
diff --git a/drivers/dma/ti/k3-udma-am62l.c b/drivers/dma/ti/k3-udma-am62l.c
index cd4a4cdf032f..ba54ba53e6d4 100644
--- a/drivers/dma/ti/k3-udma-am62l.c
+++ b/drivers/dma/ti/k3-udma-am62l.c
@@ -408,7 +408,7 @@ static int am62l_udma_rfree(struct dma *dma)
 	return 0;
 }
 
-static const struct dma_ops am62l_udma_ops = {
+static const struct dma_device_ops am62l_udma_ops = {
 	.transfer	= udma_transfer,
 	.of_xlate	= udma_of_xlate,
 	.request	= am62l_udma_request,
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index fb0fe62c53a9..1f0594749549 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -1190,7 +1190,7 @@ static int udma_rfree(struct dma *dma)
 	return 0;
 }
 
-static const struct dma_ops udma_ops = {
+static const struct dma_device_ops udma_ops = {
 	.transfer	= udma_transfer,
 	.of_xlate	= udma_of_xlate,
 	.request	= udma_request,
diff --git a/include/dma-devices.h b/include/dma-devices.h
index bbb25770f86b..bb081311dd72 100644
--- a/include/dma-devices.h
+++ b/include/dma-devices.h
@@ -40,7 +40,7 @@ struct of_phandle_args;
  * The uclass interface is implemented by all DMA devices which use
  * driver model.
  */
-struct dma_ops {
+struct dma_device_ops {
 	/**
 	 * of_xlate - Translate a client's device-tree (OF) DMA specifier.
 	 *
@@ -155,7 +155,7 @@ struct dma_ops {
 
 struct dma_device {
 	struct device *dev;
-	const struct dma_ops *ops;
+	const struct dma_device_ops *ops;
 	struct list_head list;
 };
 
-- 
2.34.1




             reply	other threads:[~2025-09-14 19:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-14 19:32 chalianis1 [this message]
2025-09-15  9:00 ` Sascha Hauer
2025-09-15  9:02 ` Ahmad Fatoum
2025-09-16  6:33   ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250914193249.23414-1-chalianis1@gmail.com \
    --to=chalianis1@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox