From 10ebd8556b7990499c896a550e3d416b444211e6 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 10 May 2024 02:23:07 +0000
Subject: [PATCH] add led

---
 kernel/drivers/tty/serial/arc_uart.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/kernel/drivers/tty/serial/arc_uart.c b/kernel/drivers/tty/serial/arc_uart.c
index 17c3fc3..6f7a7d2 100644
--- a/kernel/drivers/tty/serial/arc_uart.c
+++ b/kernel/drivers/tty/serial/arc_uart.c
@@ -609,10 +609,11 @@
 	}
 	uart->baud = val;
 
-	port->membase = of_iomap(np, 0);
-	if (!port->membase)
+	port->membase = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(port->membase)) {
 		/* No point of dev_err since UART itself is hosed here */
-		return -ENXIO;
+		return PTR_ERR(port->membase);
+	}
 
 	port->irq = irq_of_parse_and_map(np, 0);
 

--
Gitblit v1.6.2