]> git.itanic.dy.fi Git - linux-stable/commit
serial: stm32: avoid kernel warning on absence of optional IRQ
authorHolger Assmann <h.assmann@pengutronix.de>
Thu, 13 Aug 2020 15:27:57 +0000 (17:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:41 +0000 (11:29 +0200)
commit0a60539b4cd9b51fe4ba0cdefa73dd582bbf15a2
tree8aa0ef3a58de5ea3e0edc3b71d2219573f946a5f
parentdf26430356bf86fd852ecbfff1496ee735576351
serial: stm32: avoid kernel warning on absence of optional IRQ

commit fdf16d78941b4f380753053d229955baddd00712 upstream.

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: 2c58e56096dd ("serial: stm32: fix the get_irq error case")
Signed-off-by: Holger Assmann <h.assmann@pengutronix.de>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200813152757.32751-1-h.assmann@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/stm32-usart.c