mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank.Li@oss.nxp.com
To: Srinivas Kandagatla <srini@kernel.org>,
	linux-arm-msm@vger.kernel.org (open list:ARM/QUALCOMM MAILING
	LIST),
	linux-sound@vger.kernel.org (open list:SERIAL LOW-POWER
	INTER-CHIP MEDIA BUS (SLIMbus)),
	linux-kernel@vger.kernel.org (open list)
Cc: imx@lists.linux.dev, vkoul@kernel.org, Frank Li <Frank.Li@nxp.com>
Subject: [PATCH 1/1] slimbus: use dmaengine_desc_set_callback()
Date: Mon,  2 Nov 2026 12:48:17 -0500	[thread overview]
Message-ID: <20261102174818.3941639-1-Frank.Li@oss.nxp.com> (raw)

From: Frank Li <Frank.Li@nxp.com>

Replace open-coded assignments to callback and callback_param fields
of struct dma_async_tx_descriptor with calls to the
dmaengine_desc_set_callback() helper.

No functional change intended. Prepare make to struct
dma_async_tx_descriptor private to the DMA engine.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 drivers/slimbus/qcom-ngd-ctrl.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index eb983b6d1815f..539c8a6493969 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -595,8 +595,7 @@ static int qcom_slim_ngd_tx_msg_post(struct qcom_slim_ngd_ctrl *ctrl,
 		return -EINVAL;
 	}
 
-	desc->desc->callback = qcom_slim_ngd_tx_msg_dma_cb;
-	desc->desc->callback_param = desc;
+	dmaengine_desc_set_callback(desc->desc, qcom_slim_ngd_tx_msg_dma_cb, NULL, desc);
 	desc->desc->cookie = dmaengine_submit(desc->desc);
 	dma_async_issue_pending(ctrl->dma_tx_channel);
 	spin_unlock_irqrestore(&ctrl->tx_buf_lock, flags);
@@ -642,8 +641,7 @@ static void qcom_slim_ngd_rx_msgq_cb(void *args)
 		return;
 	}
 
-	desc->desc->callback = qcom_slim_ngd_rx_msgq_cb;
-	desc->desc->callback_param = desc;
+	dmaengine_desc_set_callback(desc->desc, qcom_slim_ngd_rx_msgq_cb, NULL, desc);
 	desc->desc->cookie = dmaengine_submit(desc->desc);
 	dma_async_issue_pending(ctrl->dma_rx_channel);
 }
@@ -667,8 +665,7 @@ static int qcom_slim_ngd_post_rx_msgq(struct qcom_slim_ngd_ctrl *ctrl)
 			return -EINVAL;
 		}
 
-		desc->desc->callback = qcom_slim_ngd_rx_msgq_cb;
-		desc->desc->callback_param = desc;
+		dmaengine_desc_set_callback(desc->desc, qcom_slim_ngd_rx_msgq_cb, NULL, desc);
 		desc->desc->cookie = dmaengine_submit(desc->desc);
 	}
 	dma_async_issue_pending(ctrl->dma_rx_channel);
-- 
2.43.0


                 reply	other threads:[~2026-11-02 17:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261102174818.3941639-1-Frank.Li@oss.nxp.com \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=srini@kernel.org \
    --cc=vkoul@kernel.org \
    /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

all inboxes | Powered by JetHome®