Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: txx9dmac: 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-30-allen.lkml@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Allen Pais and committed by
Vinod Koul
a81b0e6d 83547958

+6 -8
+6 -8
drivers/dma/txx9dmac.c
··· 601 601 } 602 602 } 603 603 604 - static void txx9dmac_chan_tasklet(unsigned long data) 604 + static void txx9dmac_chan_tasklet(struct tasklet_struct *t) 605 605 { 606 606 int irq; 607 607 u32 csr; 608 608 struct txx9dmac_chan *dc; 609 609 610 - dc = (struct txx9dmac_chan *)data; 610 + dc = from_tasklet(dc, t, tasklet); 611 611 csr = channel_readl(dc, CSR); 612 612 dev_vdbg(chan2dev(&dc->chan), "tasklet: status=%x\n", csr); 613 613 ··· 638 638 return IRQ_HANDLED; 639 639 } 640 640 641 - static void txx9dmac_tasklet(unsigned long data) 641 + static void txx9dmac_tasklet(struct tasklet_struct *t) 642 642 { 643 643 int irq; 644 644 u32 csr; 645 645 struct txx9dmac_chan *dc; 646 646 647 - struct txx9dmac_dev *ddev = (struct txx9dmac_dev *)data; 647 + struct txx9dmac_dev *ddev = from_tasklet(ddev, t, tasklet); 648 648 u32 mcr; 649 649 int i; 650 650 ··· 1113 1113 irq = platform_get_irq(pdev, 0); 1114 1114 if (irq < 0) 1115 1115 return irq; 1116 - tasklet_init(&dc->tasklet, txx9dmac_chan_tasklet, 1117 - (unsigned long)dc); 1116 + tasklet_setup(&dc->tasklet, txx9dmac_chan_tasklet); 1118 1117 dc->irq = irq; 1119 1118 err = devm_request_irq(&pdev->dev, dc->irq, 1120 1119 txx9dmac_chan_interrupt, 0, dev_name(&pdev->dev), dc); ··· 1199 1200 1200 1201 ddev->irq = platform_get_irq(pdev, 0); 1201 1202 if (ddev->irq >= 0) { 1202 - tasklet_init(&ddev->tasklet, txx9dmac_tasklet, 1203 - (unsigned long)ddev); 1203 + tasklet_setup(&ddev->tasklet, txx9dmac_tasklet); 1204 1204 err = devm_request_irq(&pdev->dev, ddev->irq, 1205 1205 txx9dmac_interrupt, 0, dev_name(&pdev->dev), ddev); 1206 1206 if (err)