mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank.Li@oss.nxp.com
To: "Dave Penkler" <dpenkler@gmail.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Dominik Karol Piątkowski"
	<dominik.karol.piatkowski@protonmail.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Uwe Kleine-König (The Capable Hub)"
	<u.kleine-koenig@baylibre.com>, "Frank Li" <Frank.Li@nxp.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org (open list)
Cc: imx@lists.linux.dev, vkoul@kernel.org
Subject: [PATCH 1/1] gpib: use dmaengine_desc_set_callback()
Date: Mon,  2 Nov 2026 11:48:06 -0500	[thread overview]
Message-ID: <20261102164812.3837283-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/gpib/eastwood/fluke_gpib.c | 6 ++----
 drivers/gpib/fmh_gpib/fmh_gpib.c   | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/gpib/eastwood/fluke_gpib.c b/drivers/gpib/eastwood/fluke_gpib.c
index 1363f0a1f5701..021910bce621d 100644
--- a/drivers/gpib/eastwood/fluke_gpib.c
+++ b/drivers/gpib/eastwood/fluke_gpib.c
@@ -408,8 +408,7 @@ static int fluke_dma_write(struct gpib_board *board, u8 *buffer, size_t length,
 		retval = -ENOMEM;
 		goto cleanup;
 	}
-	tx_desc->callback = fluke_dma_callback;
-	tx_desc->callback_param = board;
+	dmaengine_desc_set_callback(tx_desc, fluke_dma_callback, NULL, board);
 
 	spin_lock_irqsave(&board->spinlock, flags);
 	nec7210_set_reg_bits(nec_priv, IMR1, HR_DOIE, 0);
@@ -588,8 +587,7 @@ static int fluke_dma_read(struct gpib_board *board, u8 *buffer,
 		dma_unmap_single(NULL, bus_address, length, DMA_FROM_DEVICE);
 		return -EIO;
 	}
-	tx_desc->callback = fluke_dma_callback;
-	tx_desc->callback_param = board;
+	dmaengine_desc_set_callback(tx_desc, fluke_dma_callback, NULL, board);
 
 	spin_lock_irqsave(&board->spinlock, flags);
 	// enable nec7210 dma
diff --git a/drivers/gpib/fmh_gpib/fmh_gpib.c b/drivers/gpib/fmh_gpib/fmh_gpib.c
index 4ab9b0a317fdb..de1a055cb6477 100644
--- a/drivers/gpib/fmh_gpib/fmh_gpib.c
+++ b/drivers/gpib/fmh_gpib/fmh_gpib.c
@@ -428,8 +428,7 @@ static int fmh_gpib_dma_write(struct gpib_board *board, u8 *buffer, size_t lengt
 		retval = -ENOMEM;
 		goto cleanup;
 	}
-	tx_desc->callback = fmh_gpib_dma_callback;
-	tx_desc->callback_param = board;
+	dmaengine_desc_set_callback(tx_desc, fmh_gpib_dma_callback, NULL, board);
 
 	spin_lock_irqsave(&board->spinlock, flags);
 	fifos_write(e_priv, length & fifo_xfer_counter_mask, FIFO_XFER_COUNTER_REG);
@@ -745,8 +744,7 @@ static int fmh_gpib_dma_read(struct gpib_board *board, u8 *buffer,
 		dma_unmap_single(board->dev, bus_address, length, DMA_FROM_DEVICE);
 		return -EIO;
 	}
-	tx_desc->callback = fmh_gpib_dma_callback;
-	tx_desc->callback_param = board;
+	dmaengine_desc_set_callback(tx_desc, fmh_gpib_dma_callback, NULL, board);
 
 	spin_lock_irqsave(&board->spinlock, flags);
 	// enable nec7210 dma
-- 
2.43.0


                 reply	other threads:[~2026-11-02 16: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=20261102164812.3837283-1-Frank.Li@oss.nxp.com \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=broonie@kernel.org \
    --cc=dakr@kernel.org \
    --cc=dominik.karol.piatkowski@protonmail.com \
    --cc=dpenkler@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=imx@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u.kleine-koenig@baylibre.com \
    --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®