Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH] serial: cpm_uart: replace irq_of_parse_and_map with platform_get_irq
@ 2026-06-07  2:11 Rosen Penev
  0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-06-07  2:11 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Jiri Slaby,
	open list:TTY LAYER AND SERIAL DRIVERS

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 <rosenp@gmail.com>
---
 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 <linux/memblock.h>
 #include <linux/dma-mapping.h>
 #include <linux/of_address.h>
-#include <linux/of_irq.h>
 #include <linux/of_platform.h>
 #include <linux/gpio/consumer.h>
 #include <linux/clk.h>
@@ -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;
 }

--
2.54.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-07  2:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-07  2:11 [PATCH] serial: cpm_uart: replace irq_of_parse_and_map with platform_get_irq Rosen Penev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox