aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYork Sun <york.sun@nxp.com>2016-08-09 17:55:44 -0400
committerBorislav Petkov <bp@suse.de>2016-09-01 04:28:02 -0400
commit55764ed37eec48ad1c1cb6784166055e06dcb9df (patch)
treea1dc101485eaa76510d36a070c17d1c664606e85
parent339fdff14c1ed34acc9c3368e01b56f80692cf83 (diff)
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: York 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.com Signed-off-by: Borislav Petkov <bp@suse.de>
-rw-r--r--drivers/edac/fsl_ddr_edac.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/edac/fsl_ddr_edac.c b/drivers/edac/fsl_ddr_edac.c
index 6d4dd84a9d48..d8ce1f635c38 100644
--- a/drivers/edac/fsl_ddr_edac.c
+++ b/drivers/edac/fsl_ddr_edac.c
@@ -563,7 +563,7 @@ int fsl_mc_err_probe(struct platform_device *op)
563 ddr_out32(pdata->mc_vbase + FSL_MC_ERR_SBE, 0x10000); 563 ddr_out32(pdata->mc_vbase + FSL_MC_ERR_SBE, 0x10000);
564 564
565 /* register interrupts */ 565 /* register interrupts */
566 pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0); 566 pdata->irq = platform_get_irq(op, 0);
567 res = devm_request_irq(&op->dev, pdata->irq, 567 res = devm_request_irq(&op->dev, pdata->irq,
568 fsl_mc_isr, 568 fsl_mc_isr,
569 IRQF_SHARED, 569 IRQF_SHARED,
@@ -571,7 +571,6 @@ int fsl_mc_err_probe(struct platform_device *op)
571 if (res < 0) { 571 if (res < 0) {
572 pr_err("%s: Unable to request irq %d for FSL DDR DRAM ERR\n", 572 pr_err("%s: Unable to request irq %d for FSL DDR DRAM ERR\n",
573 __func__, pdata->irq); 573 __func__, pdata->irq);
574 irq_dispose_mapping(pdata->irq);
575 res = -ENODEV; 574 res = -ENODEV;
576 goto err2; 575 goto err2;
577 } 576 }
@@ -602,7 +601,6 @@ int fsl_mc_err_remove(struct platform_device *op)
602 edac_dbg(0, "\n"); 601 edac_dbg(0, "\n");
603 602
604 if (edac_op_state == EDAC_OPSTATE_INT) { 603 if (edac_op_state == EDAC_OPSTATE_INT) {
605 irq_dispose_mapping(pdata->irq);
606 ddr_out32(pdata->mc_vbase + FSL_MC_ERR_INT_EN, 0); 604 ddr_out32(pdata->mc_vbase + FSL_MC_ERR_INT_EN, 0);
607 } 605 }
608 606