serial: samsung: change to platform_get_irq_optional
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): CGME20210621044400epcas5p40368077e77d2da219db8f890dfd69f7c@epcas5p4.samsung.com
PATCH v4 1/1 serial: samsung: change to platform_get_irq_optional
In few older Samsung SoCs like s3c2410, s3c2412 and s3c2440, UART IP is having 2 interrupt lines. However, in other SoCs like s3c6400, s5pv210, exynos5433, and exynos4210 UART is having only 1 interrupt line. Due to this, "platform_get_irq(platdev, 1)" call in the driver gives the following false-positive error:
"IRQ index 1 not found" on recent platforms.
This patch replaces the platform_get_irq() call with platform_get_irq_optional() and hence avoiding the false-positive error.
---
Commit message is changed.
Addressed Krzysztof's previous comment.
drivers/tty/serial/samsung_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/samsung_tty.c +1 -1
@@ -1911,7 +1911,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, ourport->tx_irq = ret +1 ; } - ret =platform_get_irq (platdev,1 ); + ret =platform_get_irq_optional (platdev,1 );if (ret >0 ) ourport->tx_irq = ret;/*
Signature · 1 line
2.17.1
Quoted 44 lines
-----Original Message-----
From: Tamseel Shams <[email protected]>
Sent: Monday, June 21, 2021 10:18 AM
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Tamseel Shams <[email protected]>
Subject: [PATCH v4] serial: samsung: change toplatform_get_irq_optionalIn few older Samsung SoCs like s3c2410, s3c2412 and s3c2440, UART IP is having 2 interrupt lines.
However, in other SoCs like s3c6400, s5pv210, exynos5433, and exynos4210 UART is having only 1 interrupt line. Due to this, "platform_get_irq(platdev, 1)" call in the driver gives the following false-positive error:
"IRQ index 1 not found" on recent platforms.This patch replaces the
platform_get_irq()call withplatform_get_irq_optional()and hence avoiding the false-positive error.Signed-off-by Tamseel Shams <[email protected]>---
Commit message is changed.
Addressed Krzysztof's previous comment.drivers/tty/serial/samsung_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/tty/serial/samsung_tty.c +1
-1@@ -1911,7 +1911,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, ourport->tx_irq = ret +1 ; } - ret =platform_get_irq (platdev,1 ); + ret =platform_get_irq_optional (platdev,1 );if (ret >0 ) ourport->tx_irq = ret;
Quoted 3 lines
/*
--
Please ignore this patch.
Sorry for the spam.
Thanks & Regards,
Tamseel Shams