Re: [PATCH] ata: pata_mpc52xx: convert to platform_get_irq()
From: Sergey Shtylyov
Date: Wed Jun 03 2026 - 15:38:54 EST
On 6/3/26 10:20 PM, Rosen Penev wrote:
> 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@xxxxxxxxx>
> ---
> 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");
s/mapping/getting/?
But actually platform_get_irq() loudly curses on error already... :-)
[...]
MBR, Sergey