From c0f3332cb5f2e370c041594fa1ff59db4ee68925 Mon Sep 17 00:00:00 2001 From: Erwan Le Ray Date: Fri, 19 Mar 2021 19:42:50 +0100 Subject: [PATCH] serial: stm32: clean wakeup handling in serial_suspend Remove useless call to stm32_usart_serial_en_wakeup() routine in suspend callback. When called with "false" argument, this routine is clearing UESM and WUFIE bits if usart is not wakeup source. Those bits are already cleared in set_termios(), and then in serial_resume() callback when usart is wakeup source. Signed-off-by: Alexandre Torgue Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210319184253.5841-3-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/stm32-usart.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 11656b6b7c0f..cc054f07bd83 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -1536,8 +1536,6 @@ static int __maybe_unused stm32_usart_serial_suspend(struct device *dev) if (device_may_wakeup(dev) || device_wakeup_path(dev)) stm32_usart_serial_en_wakeup(port, true); - else - stm32_usart_serial_en_wakeup(port, false); /* * When "no_console_suspend" is enabled, keep the pinctrl default state