dmaengine: tegra20: convert tasklets to use new tasklet_setup() API
authorAllen Pais <allen.lkml@gmail.com>
Mon, 31 Aug 2020 10:35:34 +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-28-allen.lkml@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/tegra20-apb-dma.c

index 55fc740..71827d9 100644 (file)
@@ -644,9 +644,9 @@ static void handle_cont_sngl_cycle_dma_done(struct tegra_dma_channel *tdc,
        }
 }
 
-static void tegra_dma_tasklet(unsigned long data)
+static void tegra_dma_tasklet(struct tasklet_struct *t)
 {
-       struct tegra_dma_channel *tdc = (struct tegra_dma_channel *)data;
+       struct tegra_dma_channel *tdc = from_tasklet(tdc, t, tasklet);
        struct dmaengine_desc_callback cb;
        struct tegra_dma_desc *dma_desc;
        unsigned int cb_count;
@@ -1523,8 +1523,7 @@ static int tegra_dma_probe(struct platform_device *pdev)
                tdc->id = i;
                tdc->slave_id = TEGRA_APBDMA_SLAVE_ID_INVALID;
 
-               tasklet_init(&tdc->tasklet, tegra_dma_tasklet,
-                            (unsigned long)tdc);
+               tasklet_setup(&tdc->tasklet, tegra_dma_tasklet);
                spin_lock_init(&tdc->lock);
                init_waitqueue_head(&tdc->wq);