Skip to content

Commit d964d5f

Browse files
Peter Ujfalusivinodkoul
authored andcommitted
dmaengine: ti: k3-udma: Fix delayed_work usage for tx drain workaround
INIT_DELAYED_WORK_ONSTACK() must be used with on-stack delayed work, which is not the case here. Use normal delayed_work for the channels instead. Fixes: 25dcb5d ("dmaengine: ti: New driver for K3 UDMA") Reported-by: Tomi Valkeinen <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 66983bc commit d964d5f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/dma/ti/k3-udma.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,8 +1907,6 @@ static int udma_alloc_chan_resources(struct dma_chan *chan)
19071907

19081908
udma_reset_rings(uc);
19091909

1910-
INIT_DELAYED_WORK_ONSTACK(&uc->tx_drain.work,
1911-
udma_check_tx_completion);
19121910
return 0;
19131911

19141912
err_irq_free:
@@ -3020,7 +3018,6 @@ static void udma_free_chan_resources(struct dma_chan *chan)
30203018
}
30213019

30223020
cancel_delayed_work_sync(&uc->tx_drain.work);
3023-
destroy_delayed_work_on_stack(&uc->tx_drain.work);
30243021

30253022
if (uc->irq_num_ring > 0) {
30263023
free_irq(uc->irq_num_ring, uc);
@@ -3712,6 +3709,7 @@ static int udma_probe(struct platform_device *pdev)
37123709
tasklet_init(&uc->vc.task, udma_vchan_complete,
37133710
(unsigned long)&uc->vc);
37143711
init_completion(&uc->teardown_completed);
3712+
INIT_DELAYED_WORK(&uc->tx_drain.work, udma_check_tx_completion);
37153713
}
37163714

37173715
ret = dma_async_device_register(&ud->ddev);

0 commit comments

Comments
 (0)