* [PATCH] serial: arc_uart: Use platform IRQ helper
@ 2026-09-25 18:30 Rosen Penev
0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-09-25 18:30 UTC (permalink / raw)
To: linux-serial
Cc: Vineet Gupta, Greg Kroah-Hartman, Jiri Slaby,
open list:SYNOPSYS ARC ARCHITECTURE,
open list:TTY LAYER AND SERIAL DRIVERS
Avoid calling irq_dispose_mapping() by letting the platform_device
machinery handle it. Also enable possibility of handling -EPROBE_DEFER
and other errors. Handle as early as possible to avoid doing unnecessary
work.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/tty/serial/arc_uart.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
index 3988e5958896..b46b057a181b 100644
--- a/drivers/tty/serial/arc_uart.c
+++ b/drivers/tty/serial/arc_uart.c
@@ -30,7 +30,6 @@
#include <linux/tty_flip.h>
#include <linux/serial_core.h>
#include <linux/io.h>
-#include <linux/of_irq.h>
#include <linux/of_address.h>
/*************************************
@@ -571,12 +570,17 @@ static int arc_serial_probe(struct platform_device *pdev)
struct arc_uart_port *uart;
struct uart_port *port;
int dev_id;
+ int irq;
u32 val;
/* no device tree device */
if (!np)
return -ENODEV;
+ irq = platform_get_irq(pdev, 0);
+ if (irq < 0)
+ return irq;
+
dev_id = of_alias_get_id(np, "serial");
if (dev_id < 0)
dev_id = 0;
@@ -607,7 +611,7 @@ static int arc_serial_probe(struct platform_device *pdev)
return PTR_ERR(port->membase);
}
- port->irq = irq_of_parse_and_map(np, 0);
+ port->irq = irq;
port->dev = &pdev->dev;
port->iotype = UPIO_MEM;
--
2.55.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-25 18:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 18:30 [PATCH] serial: arc_uart: Use platform IRQ helper Rosen Penev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®