summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorPascal Huerst <pascal.huerst@gmail.com>2018-04-25 17:22:07 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-14 13:41:05 +0200
commit2ccdb55e52a126aa51a64a2244d8b60c16f370cc (patch)
treea40ccfcce7ae2236d817dbf58b9057729109d879 /drivers/tty
parent182ead3e418a20328b73152b8e81fc8b4cac3b0b (diff)
downloadlinux-2ccdb55e52a126aa51a64a2244d8b60c16f370cc.tar.bz2
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: Pascal Huerst <pascal.huerst@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/msm_serial.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index 33cd6e59ea69..736b74fd6623 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -1812,8 +1812,7 @@ static const struct of_device_id msm_match_table[] = {
};
MODULE_DEVICE_TABLE(of, msm_match_table);
-#ifdef CONFIG_PM_SLEEP
-static int msm_serial_suspend(struct device *dev)
+static int __maybe_unused msm_serial_suspend(struct device *dev)
{
struct msm_port *port = dev_get_drvdata(dev);
@@ -1822,7 +1821,7 @@ static int msm_serial_suspend(struct device *dev)
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);
@@ -1830,7 +1829,6 @@ static int msm_serial_resume(struct device *dev)
return 0;
}
-#endif /* CONFIG_PM_SLEEP */
static const struct dev_pm_ops msm_serial_dev_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(msm_serial_suspend, msm_serial_resume)