Skip to contentSkip to conversation

serial: cpm_uart: replace irq_of_parse_and_map with platform_get_irq

PATCH New Rosen Penev 1 participant 1 message Jun 7 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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
---
 drivers/tty/serial/cpm_uart.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/tty/serial/cpm_uart.c +3 -6
index b778a20ec9b1..39f54bb7b485 100644
@@ -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