Skip to content

Commit fdf16d7

Browse files
h-assmanngregkh
authored andcommitted
serial: stm32: avoid kernel warning on absence of optional IRQ
stm32_init_port() of the stm32-usart may trigger a warning in platform_get_irq() when the device tree specifies no wakeup interrupt. The wakeup interrupt is usually a board-specific GPIO and the driver functions correctly in its absence. The mainline stm32mp151.dtsi does not specify it, so all mainline device trees trigger an unnecessary kernel warning. Use of platform_get_irq_optional() avoids this. Fixes: 2c58e56 ("serial: stm32: fix the get_irq error case") Signed-off-by: Holger Assmann <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 27afac9 commit fdf16d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/stm32-usart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ static int stm32_init_port(struct stm32_port *stm32port,
970970
return ret;
971971

972972
if (stm32port->info->cfg.has_wakeup) {
973-
stm32port->wakeirq = platform_get_irq(pdev, 1);
973+
stm32port->wakeirq = platform_get_irq_optional(pdev, 1);
974974
if (stm32port->wakeirq <= 0 && stm32port->wakeirq != -ENXIO)
975975
return stm32port->wakeirq ? : -ENODEV;
976976
}

0 commit comments

Comments
 (0)