serial: stm32: Use __maybe_unused instead of #if CONFIG_PM_SLEEP
Use __maybe_unused for power management related functionsinstead of
fixes: 270e5a74fe
("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>
This commit is contained in:
parent
fb6dcef62d
commit
fe94347d6d
|
@ -1351,8 +1351,8 @@ static struct uart_driver stm32_usart_driver = {
|
||||||
.cons = STM32_SERIAL_CONSOLE,
|
.cons = STM32_SERIAL_CONSOLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
static void __maybe_unused stm32_serial_enable_wakeup(struct uart_port *port,
|
||||||
static void stm32_serial_enable_wakeup(struct uart_port *port, bool enable)
|
bool enable)
|
||||||
{
|
{
|
||||||
struct stm32_port *stm32_port = to_stm32_port(port);
|
struct stm32_port *stm32_port = to_stm32_port(port);
|
||||||
struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;
|
struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;
|
||||||
|
@ -1376,7 +1376,7 @@ static void stm32_serial_enable_wakeup(struct uart_port *port, bool enable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int stm32_serial_suspend(struct device *dev)
|
static int __maybe_unused stm32_serial_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct uart_port *port = dev_get_drvdata(dev);
|
struct uart_port *port = dev_get_drvdata(dev);
|
||||||
|
|
||||||
|
@ -1392,7 +1392,7 @@ static int stm32_serial_suspend(struct device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int stm32_serial_resume(struct device *dev)
|
static int __maybe_unused stm32_serial_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct uart_port *port = dev_get_drvdata(dev);
|
struct uart_port *port = dev_get_drvdata(dev);
|
||||||
|
|
||||||
|
@ -1403,7 +1403,6 @@ static int stm32_serial_resume(struct device *dev)
|
||||||
|
|
||||||
return uart_resume_port(&stm32_usart_driver, port);
|
return uart_resume_port(&stm32_usart_driver, port);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_PM_SLEEP */
|
|
||||||
|
|
||||||
static int __maybe_unused stm32_serial_runtime_suspend(struct device *dev)
|
static int __maybe_unused stm32_serial_runtime_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue