From b1839e7c2a42ccd9a0587c0092e880c7a213ee2a Mon Sep 17 00:00:00 2001 From: Allen Pais Date: Tue, 6 Oct 2020 10:34:58 +0530 Subject: dmaengine: xilinx: dpdma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20201006050458.221329-2-allen.lkml@gmail.com Signed-off-by: Vinod Koul --- drivers/dma/xilinx/xilinx_dpdma.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'drivers/dma/xilinx') diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c index 81ed1e482878..55df63dead8d 100644 --- a/drivers/dma/xilinx/xilinx_dpdma.c +++ b/drivers/dma/xilinx/xilinx_dpdma.c @@ -1458,15 +1458,15 @@ static void xilinx_dpdma_disable_irq(struct xilinx_dpdma_device *xdev) /** * xilinx_dpdma_chan_err_task - Per channel tasklet for error handling - * @data: tasklet data to be casted to DPDMA channel structure + * @t: pointer to the tasklet associated with this handler * * Per channel error handling tasklet. This function waits for the outstanding * transaction to complete and triggers error handling. After error handling, * re-enable channel error interrupts, and restart the channel if needed. */ -static void xilinx_dpdma_chan_err_task(unsigned long data) +static void xilinx_dpdma_chan_err_task(struct tasklet_struct *t) { - struct xilinx_dpdma_chan *chan = (struct xilinx_dpdma_chan *)data; + struct xilinx_dpdma_chan *chan = from_tasklet(chan, t, err_task); struct xilinx_dpdma_device *xdev = chan->xdev; unsigned long flags; @@ -1555,8 +1555,7 @@ static int xilinx_dpdma_chan_init(struct xilinx_dpdma_device *xdev, spin_lock_init(&chan->lock); init_waitqueue_head(&chan->wait_to_stop); - tasklet_init(&chan->err_task, xilinx_dpdma_chan_err_task, - (unsigned long)chan); + tasklet_setup(&chan->err_task, xilinx_dpdma_chan_err_task); chan->vchan.desc_free = xilinx_dpdma_chan_free_tx_desc; vchan_init(&chan->vchan, &xdev->common); -- cgit v1.2.3