From: Allen Pais <ap...@linux.microsoft.com>

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.per...@gmail.com>
Signed-off-by: Allen Pais <ap...@linux.microsoft.com>
---
 drivers/staging/mt7621-dma/mtk-hsdma.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/mt7621-dma/mtk-hsdma.c 
b/drivers/staging/mt7621-dma/mtk-hsdma.c
index 14592ed9ce98..354536783e1c 100644
--- a/drivers/staging/mt7621-dma/mtk-hsdma.c
+++ b/drivers/staging/mt7621-dma/mtk-hsdma.c
@@ -533,9 +533,9 @@ static void mtk_hsdma_rx(struct mtk_hsdam_engine *hsdma)
        mtk_hsdma_chan_done(hsdma, chan);
 }
 
-static void mtk_hsdma_tasklet(unsigned long arg)
+static void mtk_hsdma_tasklet(struct tasklet_struct *t)
 {
-       struct mtk_hsdam_engine *hsdma = (struct mtk_hsdam_engine *)arg;
+       struct mtk_hsdam_engine *hsdma = from_tasklet(hsdma, t, task);
 
        mtk_hsdma_rx(hsdma);
        mtk_hsdma_tx(hsdma);
@@ -670,7 +670,7 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
        if (IS_ERR(base))
                return PTR_ERR(base);
        hsdma->base = base + HSDMA_BASE_OFFSET;
-       tasklet_init(&hsdma->task, mtk_hsdma_tasklet, (unsigned long)hsdma);
+       tasklet_setup(&hsdma->task, mtk_hsdma_tasklet);
 
        irq = platform_get_irq(pdev, 0);
        if (irq < 0)
-- 
2.25.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to