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

tty: serial: fsl_lpuart: Use __maybe_unused instead of #if CONFIG_PM_SLEEP

Use __maybe_unused for power management related functions to simplify
the code.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Link: https://lore.kernel.org/r/1589547481-25932-1-git-send-email-Anson.Huang@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Anson Huang and committed by
Greg Kroah-Hartman
b14109f3 0ca650c4

+2 -4
+2 -4
drivers/tty/serial/fsl_lpuart.c
··· 2665 2665 return 0; 2666 2666 } 2667 2667 2668 - #ifdef CONFIG_PM_SLEEP 2669 - static int lpuart_suspend(struct device *dev) 2668 + static int __maybe_unused lpuart_suspend(struct device *dev) 2670 2669 { 2671 2670 struct lpuart_port *sport = dev_get_drvdata(dev); 2672 2671 unsigned long temp; ··· 2723 2724 return 0; 2724 2725 } 2725 2726 2726 - static int lpuart_resume(struct device *dev) 2727 + static int __maybe_unused lpuart_resume(struct device *dev) 2727 2728 { 2728 2729 struct lpuart_port *sport = dev_get_drvdata(dev); 2729 2730 bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq)); ··· 2754 2755 2755 2756 return 0; 2756 2757 } 2757 - #endif 2758 2758 2759 2759 static SIMPLE_DEV_PM_OPS(lpuart_pm_ops, lpuart_suspend, lpuart_resume); 2760 2760