提交 2ccdb55e 编写于 作者: P Pascal Huerst 提交者: Greg Kroah-Hartman

tty: serial: msm_serial: Add __maybe_unused to suspend/resume callbacks

As stated under "20) Conditional Compilation" in coding-style.rst. We
shall rather use __maybe_unused than preprocessor macros in such cases.
Signed-off-by: NPascal Huerst <pascal.huerst@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 182ead3e
...@@ -1812,8 +1812,7 @@ static const struct of_device_id msm_match_table[] = { ...@@ -1812,8 +1812,7 @@ static const struct of_device_id msm_match_table[] = {
}; };
MODULE_DEVICE_TABLE(of, msm_match_table); MODULE_DEVICE_TABLE(of, msm_match_table);
#ifdef CONFIG_PM_SLEEP static int __maybe_unused msm_serial_suspend(struct device *dev)
static int msm_serial_suspend(struct device *dev)
{ {
struct msm_port *port = dev_get_drvdata(dev); struct msm_port *port = dev_get_drvdata(dev);
...@@ -1822,7 +1821,7 @@ static int msm_serial_suspend(struct device *dev) ...@@ -1822,7 +1821,7 @@ static int msm_serial_suspend(struct device *dev)
return 0; return 0;
} }
static int msm_serial_resume(struct device *dev) static int __maybe_unused msm_serial_resume(struct device *dev)
{ {
struct msm_port *port = dev_get_drvdata(dev); struct msm_port *port = dev_get_drvdata(dev);
...@@ -1830,7 +1829,6 @@ static int msm_serial_resume(struct device *dev) ...@@ -1830,7 +1829,6 @@ static int msm_serial_resume(struct device *dev)
return 0; return 0;
} }
#endif /* CONFIG_PM_SLEEP */
static const struct dev_pm_ops msm_serial_dev_pm_ops = { static const struct dev_pm_ops msm_serial_dev_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(msm_serial_suspend, msm_serial_resume) SET_SYSTEM_SLEEP_PM_OPS(msm_serial_suspend, msm_serial_resume)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册