dmaengine: ste_dma40: convert tasklets to use new tasklet_setup() API
authorAllen Pais <allen.lkml@gmail.com>
Mon, 31 Aug 2020 10:35:32 +0000 (16:05 +0530)
committerVinod Koul <vkoul@kernel.org>
Fri, 18 Sep 2020 06:49:07 +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-26-allen.lkml@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ste_dma40.c

index 6b10d5c..77ab1f4 100644 (file)
@@ -1571,9 +1571,9 @@ static void dma_tc_handle(struct d40_chan *d40c)
 
 }
 
-static void dma_tasklet(unsigned long data)
+static void dma_tasklet(struct tasklet_struct *t)
 {
-       struct d40_chan *d40c = (struct d40_chan *) data;
+       struct d40_chan *d40c = from_tasklet(d40c, t, tasklet);
        struct d40_desc *d40d;
        unsigned long flags;
        bool callback_active;
@@ -2804,8 +2804,7 @@ static void __init d40_chan_init(struct d40_base *base, struct dma_device *dma,
                INIT_LIST_HEAD(&d40c->client);
                INIT_LIST_HEAD(&d40c->prepare_queue);
 
-               tasklet_init(&d40c->tasklet, dma_tasklet,
-                            (unsigned long) d40c);
+               tasklet_setup(&d40c->tasklet, dma_tasklet);
 
                list_add_tail(&d40c->chan.device_node,
                              &dma->channels);