Skip to content

Commit 31a8d8f

Browse files
Anson-Huanggregkh
authored andcommitted
tty: serial: imx: Use platform_get_irq_optional() for optional IRQs
All i.MX SoCs except i.MX1 have ONLY one necessary IRQ, use platform_get_irq_optional() to get second/third IRQ which are optional to avoid below error message during probe: [ 0.726219] imx-uart 30860000.serial: IRQ index 1 not found [ 0.731329] imx-uart 30860000.serial: IRQ index 2 not found Fixes: 7723f4c ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Anson Huang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ff30283 commit 31a8d8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/tty/serial/imx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2222,8 +2222,8 @@ static int imx_uart_probe(struct platform_device *pdev)
22222222
return PTR_ERR(base);
22232223

22242224
rxirq = platform_get_irq(pdev, 0);
2225-
txirq = platform_get_irq(pdev, 1);
2226-
rtsirq = platform_get_irq(pdev, 2);
2225+
txirq = platform_get_irq_optional(pdev, 1);
2226+
rtsirq = platform_get_irq_optional(pdev, 2);
22272227

22282228
sport->port.dev = &pdev->dev;
22292229
sport->port.mapbase = res->start;

0 commit comments

Comments
 (0)