mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] gpib: use dmaengine_desc_set_callback()
@ 2026-11-02 16:48 Frank.Li
  0 siblings, 0 replies; only message in thread
From: Frank.Li @ 2026-11-02 16:48 UTC (permalink / raw)
  To: Dave Penkler, Greg Kroah-Hartman, Dominik Karol Piątkowski,
	Danilo Krummrich, Bjorn Helgaas,
	Uwe Kleine-König (The Capable Hub),
	Frank Li, Mark Brown, Andy Shevchenko, open list
  Cc: imx, vkoul

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-02 16:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 16:48 [PATCH 1/1] gpib: use dmaengine_desc_set_callback() Frank.Li

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®