summaryrefslogtreecommitdiffstats
path: root/drivers/dma/imx-dma.c
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2020-08-31 12:35:15 +0200
committerVinod Koul <vkoul@kernel.org>2020-09-18 08:49:06 +0200
commitcce010a5320967424ceaa7f23aa6d7cf1eb1aff9 (patch)
tree78dc6ab74c4cf52e0dfe8dab5e6c4f2f30336cf3 /drivers/dma/imx-dma.c
parentdmaengine: ep93xx: convert tasklets to use new tasklet_setup() API (diff)
downloadlinux-cce010a5320967424ceaa7f23aa6d7cf1eb1aff9.tar.xz
linux-cce010a5320967424ceaa7f23aa6d7cf1eb1aff9.zip
dmaengine: imx-dma: 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 <romain.perier@gmail.com> Signed-off-by: Allen Pais <allen.lkml@gmail.com> Link: https://lore.kernel.org/r/20200831103542.305571-9-allen.lkml@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/imx-dma.c')
-rw-r--r--drivers/dma/imx-dma.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index 67ac2e68707e..670db04b0757 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -612,9 +612,9 @@ static int imxdma_xfer_desc(struct imxdma_desc *d)
return 0;
}
-static void imxdma_tasklet(unsigned long data)
+static void imxdma_tasklet(struct tasklet_struct *t)
{
- struct imxdma_channel *imxdmac = (void *)data;
+ struct imxdma_channel *imxdmac = from_tasklet(imxdmac, t, dma_tasklet);
struct imxdma_engine *imxdma = imxdmac->imxdma;
struct imxdma_desc *desc, *next_desc;
unsigned long flags;
@@ -1168,8 +1168,7 @@ static int __init imxdma_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&imxdmac->ld_free);
INIT_LIST_HEAD(&imxdmac->ld_active);
- tasklet_init(&imxdmac->dma_tasklet, imxdma_tasklet,
- (unsigned long)imxdmac);
+ tasklet_setup(&imxdmac->dma_tasklet, imxdma_tasklet);
imxdmac->chan.device = &imxdma->dma_device;
dma_cookie_init(&imxdmac->chan);
imxdmac->channel = i;