Commit 55764ed3 authored by York Sun's avatar York Sun Committed by Borislav Petkov

EDAC, fsl_ddr: Fix IRQ dispose warning when module is removed

When compiled as a module, removing it causes kernel warnings
when irq_dispose_mapping() is called. Instead of calling
irq_of_parse_and_map(), use platform_get_irq() to acquire the IRQ
number.
Signed-off-by: default avatarYork Sun <york.sun@nxp.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: morbidrsa@gmail.com
Cc: oss@buserror.net
Cc: stuart.yoder@nxp.com
Link: http://lkml.kernel.org/r/1470779760-16483-8-git-send-email-york.sun@nxp.comSigned-off-by: default avatarBorislav Petkov <bp@suse.de>
parent 339fdff1
...@@ -563,7 +563,7 @@ int fsl_mc_err_probe(struct platform_device *op) ...@@ -563,7 +563,7 @@ int fsl_mc_err_probe(struct platform_device *op)
ddr_out32(pdata->mc_vbase + FSL_MC_ERR_SBE, 0x10000); ddr_out32(pdata->mc_vbase + FSL_MC_ERR_SBE, 0x10000);
/* register interrupts */ /* 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, res = devm_request_irq(&op->dev, pdata->irq,
fsl_mc_isr, fsl_mc_isr,
IRQF_SHARED, IRQF_SHARED,
...@@ -571,7 +571,6 @@ int fsl_mc_err_probe(struct platform_device *op) ...@@ -571,7 +571,6 @@ int fsl_mc_err_probe(struct platform_device *op)
if (res < 0) { if (res < 0) {
pr_err("%s: Unable to request irq %d for FSL DDR DRAM ERR\n", pr_err("%s: Unable to request irq %d for FSL DDR DRAM ERR\n",
__func__, pdata->irq); __func__, pdata->irq);
irq_dispose_mapping(pdata->irq);
res = -ENODEV; res = -ENODEV;
goto err2; goto err2;
} }
...@@ -602,7 +601,6 @@ int fsl_mc_err_remove(struct platform_device *op) ...@@ -602,7 +601,6 @@ int fsl_mc_err_remove(struct platform_device *op)
edac_dbg(0, "\n"); edac_dbg(0, "\n");
if (edac_op_state == EDAC_OPSTATE_INT) { if (edac_op_state == EDAC_OPSTATE_INT) {
irq_dispose_mapping(pdata->irq);
ddr_out32(pdata->mc_vbase + FSL_MC_ERR_INT_EN, 0); ddr_out32(pdata->mc_vbase + FSL_MC_ERR_INT_EN, 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment