Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

York Sun and committed by
Borislav Petkov
55764ed3 339fdff1

+1 -3
+1 -3
drivers/edac/fsl_ddr_edac.c
··· 563 563 ddr_out32(pdata->mc_vbase + FSL_MC_ERR_SBE, 0x10000); 564 564 565 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 567 res = devm_request_irq(&op->dev, pdata->irq, 568 568 fsl_mc_isr, 569 569 IRQF_SHARED, ··· 571 571 if (res < 0) { 572 572 pr_err("%s: Unable to request irq %d for FSL DDR DRAM ERR\n", 573 573 __func__, pdata->irq); 574 - irq_dispose_mapping(pdata->irq); 575 574 res = -ENODEV; 576 575 goto err2; 577 576 } ··· 601 602 edac_dbg(0, "\n"); 602 603 603 604 if (edac_op_state == EDAC_OPSTATE_INT) { 604 - irq_dispose_mapping(pdata->irq); 605 605 ddr_out32(pdata->mc_vbase + FSL_MC_ERR_INT_EN, 0); 606 606 } 607 607