Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: stm32: Use __maybe_unused instead of #if CONFIG_PM_SLEEP

Use __maybe_unused for power management related functionsinstead of

fixes: 270e5a74fe4c ("serial: stm32: add wakeup mechanism")
Signed-off-by: Erwan Le Ray <erwan.leray@st.com>

Link: https://lore.kernel.org/r/1560433800-12255-6-git-send-email-erwan.leray@st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Erwan Le Ray and committed by
Greg Kroah-Hartman
fe94347d fb6dcef6

+4 -5
+4 -5
drivers/tty/serial/stm32-usart.c
··· 1351 1351 .cons = STM32_SERIAL_CONSOLE, 1352 1352 }; 1353 1353 1354 - #ifdef CONFIG_PM_SLEEP 1355 - static void stm32_serial_enable_wakeup(struct uart_port *port, bool enable) 1354 + static void __maybe_unused stm32_serial_enable_wakeup(struct uart_port *port, 1355 + bool enable) 1356 1356 { 1357 1357 struct stm32_port *stm32_port = to_stm32_port(port); 1358 1358 struct stm32_usart_offsets *ofs = &stm32_port->info->ofs; ··· 1376 1376 } 1377 1377 } 1378 1378 1379 - static int stm32_serial_suspend(struct device *dev) 1379 + static int __maybe_unused stm32_serial_suspend(struct device *dev) 1380 1380 { 1381 1381 struct uart_port *port = dev_get_drvdata(dev); 1382 1382 ··· 1392 1392 return 0; 1393 1393 } 1394 1394 1395 - static int stm32_serial_resume(struct device *dev) 1395 + static int __maybe_unused stm32_serial_resume(struct device *dev) 1396 1396 { 1397 1397 struct uart_port *port = dev_get_drvdata(dev); 1398 1398 ··· 1403 1403 1404 1404 return uart_resume_port(&stm32_usart_driver, port); 1405 1405 } 1406 - #endif /* CONFIG_PM_SLEEP */ 1407 1406 1408 1407 static int __maybe_unused stm32_serial_runtime_suspend(struct device *dev) 1409 1408 {