From 831603b3e8aa3892de229fda846b2f859c518699 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 6 Jun 2026 19:11:17 -0700 Subject: [PATCH] serial: cpm_uart: replace irq_of_parse_and_map with platform_get_irq platform_get_irq is a newer API for this that does not require irq_dispose_mapping(). Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev Link: https://patch.msgid.link/20260607021117.6325-1-rosenp@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/cpm_uart.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/cpm_uart.c b/drivers/tty/serial/cpm_uart.c index b778a20ec9b1..39f54bb7b485 100644 --- a/drivers/tty/serial/cpm_uart.c +++ b/drivers/tty/serial/cpm_uart.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -1530,16 +1529,14 @@ static int cpm_uart_probe(struct platform_device *ofdev) /* initialize the device pointer for the port */ pinfo->port.dev = &ofdev->dev; - pinfo->port.irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); - if (!pinfo->port.irq) - return -EINVAL; + pinfo->port.irq = platform_get_irq(ofdev, 0); + if (pinfo->port.irq < 0) + return pinfo->port.irq; ret = cpm_uart_init_port(ofdev->dev.of_node, pinfo); if (!ret) return uart_add_one_port(&cpm_reg, &pinfo->port); - irq_dispose_mapping(pinfo->port.irq); - return ret; }