mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
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>
This commit is contained in:
parent
0ca650c430
commit
b14109f302
@ -2665,8 +2665,7 @@ static int lpuart_remove(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
static int __maybe_unused lpuart_suspend(struct device *dev)
|
||||||
static int lpuart_suspend(struct device *dev)
|
|
||||||
{
|
{
|
||||||
struct lpuart_port *sport = dev_get_drvdata(dev);
|
struct lpuart_port *sport = dev_get_drvdata(dev);
|
||||||
unsigned long temp;
|
unsigned long temp;
|
||||||
@ -2724,7 +2723,7 @@ static int lpuart_suspend(struct device *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lpuart_resume(struct device *dev)
|
static int __maybe_unused lpuart_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct lpuart_port *sport = dev_get_drvdata(dev);
|
struct lpuart_port *sport = dev_get_drvdata(dev);
|
||||||
bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq));
|
bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq));
|
||||||
@ -2755,7 +2754,6 @@ static int lpuart_resume(struct device *dev)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static SIMPLE_DEV_PM_OPS(lpuart_pm_ops, lpuart_suspend, lpuart_resume);
|
static SIMPLE_DEV_PM_OPS(lpuart_pm_ops, lpuart_suspend, lpuart_resume);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user