lkml.org 
[lkml]   [2016]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[Patch v3 09/11] driver/edac/fsl_ddr: Fix kernel warning when module is removed
Date
When compiled as a module, removing this module causes kernel
warnings when irq_dispose_mapping() is called. Instead of calling
irq_of_parse_and_map(), using platform_get_irq() to acquire the
IRQ number.

Signed-off-by: York Sun <york.sun@nxp.com>

---
Change log
v3: no change
v2: no change

drivers/edac/fsl_ddr_edac.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/edac/fsl_ddr_edac.c b/drivers/edac/fsl_ddr_edac.c
index b1b7924..a3fc8fe 100644
--- a/drivers/edac/fsl_ddr_edac.c
+++ b/drivers/edac/fsl_ddr_edac.c
@@ -563,7 +563,7 @@ int fsl_ddr_mc_err_probe(struct platform_device *op)
ddr_out32(pdata->mc_vbase + MC_ERR_SBE, 0x10000);

/* register interrupts */
- pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0);
+ pdata->irq = platform_get_irq(op, 0);
res = devm_request_irq(&op->dev, pdata->irq,
fsl_ddr_mc_isr,
IRQF_SHARED,
@@ -571,7 +571,6 @@ int fsl_ddr_mc_err_probe(struct platform_device *op)
if (res < 0) {
pr_err("%s: Unable to request irq %d for FSL DDR DRAM ERR\n",
__func__, pdata->irq);
- irq_dispose_mapping(pdata->irq);
res = -ENODEV;
goto err2;
}
@@ -603,7 +602,6 @@ int fsl_ddr_mc_err_remove(struct platform_device *op)
edac_dbg(0, "\n");

if (edac_op_state == EDAC_OPSTATE_INT) {
- irq_dispose_mapping(pdata->irq);
ddr_out32(pdata->mc_vbase + MC_ERR_INT_EN, 0);
}

--
2.7.4
\
 
 \ /
  Last update: 2016-08-05 02:01    [W:1.245 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site