lkml.org 
[lkml]   [2023]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 05/11] dmaengine: dw-axi-dmac: delay irq getting until request_irq
Date
This is to prepare for per-channel irq support in next patch. In
per-channel irq case, we need to parse dt firstly to know whether
the platform is per-channel irq or not.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index e596910e9f84..64b4ee2d618b 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -1403,10 +1403,6 @@ static int dw_probe(struct platform_device *pdev)
chip->dev = &pdev->dev;
chip->dw->hdata = hdata;

- chip->irq = platform_get_irq(pdev, 0);
- if (chip->irq < 0)
- return chip->irq;
-
chip->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(chip->regs))
return PTR_ERR(chip->regs);
@@ -1447,6 +1443,10 @@ static int dw_probe(struct platform_device *pdev)
if (!dw->chan)
return -ENOMEM;

+ chip->irq = platform_get_irq(pdev, 0);
+ if (chip->irq < 0)
+ return chip->irq;
+
ret = devm_request_irq(chip->dev, chip->irq, dw_axi_dma_interrupt,
IRQF_SHARED, KBUILD_MODNAME, chip);
if (ret)
--
2.40.0
\
 
 \ /
  Last update: 2023-05-21 13:50    [W:0.096 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site