dmaengine: k3dma: convert tasklets to use new tasklet_setup() API
authorAllen Pais <allen.lkml@gmail.com>
Mon, 31 Aug 2020 10:35:19 +0000 (16:05 +0530)
committerVinod Koul <vkoul@kernel.org>
Fri, 18 Sep 2020 06:49:06 +0000 (12:19 +0530)
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 <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200831103542.305571-13-allen.lkml@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/k3dma.c

index c5c1aa0..f609a84 100644 (file)
@@ -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");