dmaengine: mediatek: 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-14-allen.lkml@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
881bd14289
commit
80ef88693e
|
@ -356,9 +356,9 @@ static struct mtk_cqdma_vdesc
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mtk_cqdma_tasklet_cb(unsigned long data)
|
static void mtk_cqdma_tasklet_cb(struct tasklet_struct *t)
|
||||||
{
|
{
|
||||||
struct mtk_cqdma_pchan *pc = (struct mtk_cqdma_pchan *)data;
|
struct mtk_cqdma_pchan *pc = from_tasklet(pc, t, tasklet);
|
||||||
struct mtk_cqdma_vdesc *cvd = NULL;
|
struct mtk_cqdma_vdesc *cvd = NULL;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
|
@ -878,8 +878,7 @@ static int mtk_cqdma_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
/* initialize tasklet for each PC */
|
/* initialize tasklet for each PC */
|
||||||
for (i = 0; i < cqdma->dma_channels; ++i)
|
for (i = 0; i < cqdma->dma_channels; ++i)
|
||||||
tasklet_init(&cqdma->pc[i]->tasklet, mtk_cqdma_tasklet_cb,
|
tasklet_setup(&cqdma->pc[i]->tasklet, mtk_cqdma_tasklet_cb);
|
||||||
(unsigned long)cqdma->pc[i]);
|
|
||||||
|
|
||||||
dev_info(&pdev->dev, "MediaTek CQDMA driver registered\n");
|
dev_info(&pdev->dev, "MediaTek CQDMA driver registered\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue