mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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>
This commit is contained in:
@@ -601,13 +601,13 @@ scan_done:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void txx9dmac_chan_tasklet(unsigned long data)
|
static void txx9dmac_chan_tasklet(struct tasklet_struct *t)
|
||||||
{
|
{
|
||||||
int irq;
|
int irq;
|
||||||
u32 csr;
|
u32 csr;
|
||||||
struct txx9dmac_chan *dc;
|
struct txx9dmac_chan *dc;
|
||||||
|
|
||||||
dc = (struct txx9dmac_chan *)data;
|
dc = from_tasklet(dc, t, tasklet);
|
||||||
csr = channel_readl(dc, CSR);
|
csr = channel_readl(dc, CSR);
|
||||||
dev_vdbg(chan2dev(&dc->chan), "tasklet: status=%x\n", csr);
|
dev_vdbg(chan2dev(&dc->chan), "tasklet: status=%x\n", csr);
|
||||||
|
|
||||||
@@ -638,13 +638,13 @@ static irqreturn_t txx9dmac_chan_interrupt(int irq, void *dev_id)
|
|||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void txx9dmac_tasklet(unsigned long data)
|
static void txx9dmac_tasklet(struct tasklet_struct *t)
|
||||||
{
|
{
|
||||||
int irq;
|
int irq;
|
||||||
u32 csr;
|
u32 csr;
|
||||||
struct txx9dmac_chan *dc;
|
struct txx9dmac_chan *dc;
|
||||||
|
|
||||||
struct txx9dmac_dev *ddev = (struct txx9dmac_dev *)data;
|
struct txx9dmac_dev *ddev = from_tasklet(ddev, t, tasklet);
|
||||||
u32 mcr;
|
u32 mcr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -1113,8 +1113,7 @@ static int __init txx9dmac_chan_probe(struct platform_device *pdev)
|
|||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq < 0)
|
if (irq < 0)
|
||||||
return irq;
|
return irq;
|
||||||
tasklet_init(&dc->tasklet, txx9dmac_chan_tasklet,
|
tasklet_setup(&dc->tasklet, txx9dmac_chan_tasklet);
|
||||||
(unsigned long)dc);
|
|
||||||
dc->irq = irq;
|
dc->irq = irq;
|
||||||
err = devm_request_irq(&pdev->dev, dc->irq,
|
err = devm_request_irq(&pdev->dev, dc->irq,
|
||||||
txx9dmac_chan_interrupt, 0, dev_name(&pdev->dev), dc);
|
txx9dmac_chan_interrupt, 0, dev_name(&pdev->dev), dc);
|
||||||
@@ -1200,8 +1199,7 @@ static int __init txx9dmac_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
ddev->irq = platform_get_irq(pdev, 0);
|
ddev->irq = platform_get_irq(pdev, 0);
|
||||||
if (ddev->irq >= 0) {
|
if (ddev->irq >= 0) {
|
||||||
tasklet_init(&ddev->tasklet, txx9dmac_tasklet,
|
tasklet_setup(&ddev->tasklet, txx9dmac_tasklet);
|
||||||
(unsigned long)ddev);
|
|
||||||
err = devm_request_irq(&pdev->dev, ddev->irq,
|
err = devm_request_irq(&pdev->dev, ddev->irq,
|
||||||
txx9dmac_interrupt, 0, dev_name(&pdev->dev), ddev);
|
txx9dmac_interrupt, 0, dev_name(&pdev->dev), ddev);
|
||||||
if (err)
|
if (err)
|
||||||
|
Reference in New Issue
Block a user