From: Rosen Penev <rosenp@gmail.com>
To: linux-edac@vger.kernel.org
Cc: Johannes Thumshirn <morbidrsa@gmail.com>,
Borislav Petkov <bp@alien8.de>, Tony Luck <tony.luck@intel.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] EDAC/mpc85xx: Use platform_get_irq() to get interrupt
Date: Wed, 3 Jun 2026 12:19:08 -0700 [thread overview]
Message-ID: <20260603191908.5618-1-rosenp@gmail.com> (raw)
Use platform_get_irq() to retrieve the interrupt resource instead of
directly parsing and mapping the OF node via irq_of_parse_and_map().
This is the standard pattern for platform devices.
In addition, platform_get_irq() returns a negative error code on
failure, which is now checked. Since we are no longer using
irq_of_parse_and_map(), we do not need to call irq_dispose_mapping()
on error or driver removal, so remove those calls.
Assisted-by: Antigravity:Gemini-3.5-Flash
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/edac/mpc85xx_edac.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index 277f1c6bd522..f494d922c6a1 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -555,14 +555,17 @@ static int mpc85xx_l2_err_probe(struct platform_device *op)
}
if (edac_op_state == EDAC_OPSTATE_INT) {
- pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0);
+ pdata->irq = platform_get_irq(op, 0);
+ if (pdata->irq < 0) {
+ res = pdata->irq;
+ goto err;
+ }
res = devm_request_irq(&op->dev, pdata->irq,
mpc85xx_l2_isr, IRQF_SHARED,
"[EDAC] L2 err", edac_dev);
if (res < 0) {
pr_err("%s: Unable to request irq %d for MPC85xx L2 err\n",
__func__, pdata->irq);
- irq_dispose_mapping(pdata->irq);
res = -ENODEV;
goto err2;
}
@@ -596,10 +599,8 @@ static void mpc85xx_l2_err_remove(struct platform_device *op)
edac_dbg(0, "\n");
- if (edac_op_state == EDAC_OPSTATE_INT) {
+ if (edac_op_state == EDAC_OPSTATE_INT)
out_be32(pdata->l2_vbase + MPC85XX_L2_ERRINTEN, 0);
- irq_dispose_mapping(pdata->irq);
- }
out_be32(pdata->l2_vbase + MPC85XX_L2_ERRDIS, orig_l2_err_disable);
edac_device_del_device(&op->dev);
--
2.54.0
next reply other threads:[~2026-06-03 19:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 19:19 Rosen Penev [this message]
2026-06-04 1:54 ` [PATCH] EDAC/mpc85xx: Use platform_get_irq() to get interrupt Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260603191908.5618-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=morbidrsa@gmail.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.