[Linux-stm32] [PATCH 1/1] spi: use dmaengine_desc_set_callback()
Andy Shevchenko
andriy.shevchenko at linux.intel.com
Thu Nov 5 11:37:51 CET 2026
On Thu, Nov 05, 2026 at 10:52:38AM +0100, Heiko Stübner wrote:
> Am Montag, 2. November 2026, 18:39:58 Mitteleuropäische Normalzeit schrieb Frank.Li at oss.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 across SPI bus drivers.
> >
> > No functional change intended. Prepare make to struct
> > dma_async_tx_descriptor private to the DMA engine.
[...]
> > diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
> > index 1a81fd94b4396..f8d6cea2f3dad 100644
> > --- a/drivers/spi/spi-rockchip.c
> > +++ b/drivers/spi/spi-rockchip.c
> > @@ -475,8 +475,7 @@ static int rockchip_spi_prepare_dma(struct rockchip_spi *rs,
> > if (!rxdesc)
> > return -EINVAL;
> >
> > - rxdesc->callback = rockchip_spi_dma_rxcb;
> > - rxdesc->callback_param = ctlr;
> > + dmaengine_desc_set_callback(rxdesc, rockchip_spi_dma_rxcb, NULL, ctlr);
> > }
> >
> > txdesc = NULL;
> > @@ -500,8 +499,7 @@ static int rockchip_spi_prepare_dma(struct rockchip_spi *rs,
> > return -EINVAL;
> > }
> >
> > - txdesc->callback = rockchip_spi_dma_txcb;
> > - txdesc->callback_param = ctlr;
> > + dmaengine_desc_set_callback(txdesc, rockchip_spi_dma_txcb, NULL, ctlr);
> > }
> >
> > /* rx must be started before tx due to spi instinct */
>
> Reviewed-by: Heiko Stuebner <heiko at sntech.de>
Please, use "# subpart(s)" syntax with this tag
Reviewed-by: Heiko Stuebner <heiko at sntech.de> # rockchip
--
With Best Regards,
Andy Shevchenko
More information about the Linux-stm32
mailing list