From: Allen Pais Date: Mon, 31 Aug 2020 10:35:19 +0000 (+0530) Subject: dmaengine: k3dma: convert tasklets to use new tasklet_setup() API X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=881bd142898e32f8bae93ec22f9ef6a104d8e0a8;p=linux.git dmaengine: k3dma: 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/20200831103542.305571-13-allen.lkml@gmail.com Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index c5c1aa0dcaedd..f609a84c493ca 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -297,9 +297,9 @@ static int k3_dma_start_txd(struct k3_dma_chan *c) return -EAGAIN; } -static void k3_dma_tasklet(unsigned long arg) +static void k3_dma_tasklet(struct tasklet_struct *t) { - struct k3_dma_dev *d = (struct k3_dma_dev *)arg; + struct k3_dma_dev *d = from_tasklet(d, t, task); struct k3_dma_phy *p; struct k3_dma_chan *c, *cn; unsigned pch, pch_alloc = 0; @@ -962,7 +962,7 @@ static int k3_dma_probe(struct platform_device *op) spin_lock_init(&d->lock); INIT_LIST_HEAD(&d->chan_pending); - tasklet_init(&d->task, k3_dma_tasklet, (unsigned long)d); + tasklet_setup(&d->task, k3_dma_tasklet); platform_set_drvdata(op, d); dev_info(&op->dev, "initialized\n");