From: Rosen Penev <rosenp@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Damien Le Moal <dlemoal@kernel.org>,
Niklas Cassel <cassel@kernel.org>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] ata: pata_mpc52xx: convert to platform_get_irq()
Date: Wed, 3 Jun 2026 12:20:28 -0700 [thread overview]
Message-ID: <20260603192028.5818-1-rosenp@gmail.com> (raw)
Replace irq_of_parse_and_map() with platform_get_irq(), which returns
a negative errno on failure and integrates with the platform device
model. Since platform_get_irq() does not create a separately managed
mapping, the corresponding irq_dispose_mapping() calls in the probe
error path and remove function are no longer needed.
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/ata/pata_mpc52xx.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 210a63283f62..f8ecd58765dd 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -730,10 +730,10 @@ static int mpc52xx_ata_probe(struct platform_device *op)
if ((prop) && (proplen >= 4))
udma_mask = ATA_UDMA2 & ((1 << (*prop + 1)) - 1);
- ata_irq = irq_of_parse_and_map(op->dev.of_node, 0);
- if (!ata_irq) {
+ ata_irq = platform_get_irq(op, 0);
+ if (ata_irq < 0) {
dev_err(&op->dev, "error mapping irq\n");
- return -EINVAL;
+ return ata_irq;
}
/* Prepare our private structure */
@@ -796,7 +796,6 @@ static int mpc52xx_ata_probe(struct platform_device *op)
irq_dispose_mapping(task_irq);
bcom_ata_release(dmatsk);
err1:
- irq_dispose_mapping(ata_irq);
return rv;
}
@@ -813,7 +812,6 @@ static void mpc52xx_ata_remove(struct platform_device *op)
task_irq = bcom_get_task_irq(priv->dmatsk);
irq_dispose_mapping(task_irq);
bcom_ata_release(priv->dmatsk);
- irq_dispose_mapping(priv->ata_irq);
}
#ifdef CONFIG_PM_SLEEP
--
2.54.0
next reply other threads:[~2026-06-03 19:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 19:20 Rosen Penev [this message]
2026-06-03 19:30 ` [PATCH] ata: pata_mpc52xx: convert to platform_get_irq() sashiko-bot
2026-06-03 19:38 ` Sergey Shtylyov
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=20260603192028.5818-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox