“ccca7cdc1b8dd2e7b67e9289a6abf117b11cbe6b”上不存在“sound/git@gitcode.net:openanolis/cloud-kernel.git”
提交 b51e3f5a 编写于 作者: P Paul Bolle 提交者: Greg Kroah-Hartman

sprd_serial: compile sprd_suspend and sprd_resume conditionally

Building sprd_serial.o when CONFIG_PM_SLEEP is not defined triggers
these warnings:
    drivers/tty/serial/sprd_serial.c:755:12: warning: ‘sprd_suspend’ defined but not used [-Wunused-function]
     static int sprd_suspend(struct device *dev)
                ^
    drivers/tty/serial/sprd_serial.c:764:12: warning: ‘sprd_resume’ defined but not used [-Wunused-function]
     static int sprd_resume(struct device *dev)
                ^

Let's compile these functions only when CONFIG_PM_SLEEP is defined.
Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ad3d4fdc
......@@ -752,6 +752,7 @@ static int sprd_probe(struct platform_device *pdev)
return ret;
}
#ifdef CONFIG_PM_SLEEP
static int sprd_suspend(struct device *dev)
{
struct sprd_uart_port *sup = dev_get_drvdata(dev);
......@@ -769,6 +770,7 @@ static int sprd_resume(struct device *dev)
return 0;
}
#endif
static SIMPLE_DEV_PM_OPS(sprd_pm_ops, sprd_suspend, sprd_resume);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部