[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1453138902-11657-2-git-send-email-dmitry.torokhov@gmail.com>
Date: Mon, 18 Jan 2016 09:41:39 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: linux-input@...r.kernel.org,
Timo Teräs <timo.teras@....fi>,
Daniel Mack <daniel@...que.org>
Cc: Haojian Zhuang <haojian.zhuang@...il.com>,
Robert Jarzmik <robert.jarzmik@...e.fr>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/4] Input: rotary_encoder - mark PM methods as __maybe_unused
Instead of guarding PM methods with #ifdef let's mark them as
__maybe_unused as it allows for better compile coverage.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
---
drivers/input/misc/rotary_encoder.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c
index 7828bd1..b9a86ca 100644
--- a/drivers/input/misc/rotary_encoder.c
+++ b/drivers/input/misc/rotary_encoder.c
@@ -381,8 +381,7 @@ static int rotary_encoder_probe(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
-static int rotary_encoder_suspend(struct device *dev)
+static int __maybe_unused rotary_encoder_suspend(struct device *dev)
{
struct rotary_encoder *encoder = dev_get_drvdata(dev);
@@ -394,7 +393,7 @@ static int rotary_encoder_suspend(struct device *dev)
return 0;
}
-static int rotary_encoder_resume(struct device *dev)
+static int __maybe_unused rotary_encoder_resume(struct device *dev)
{
struct rotary_encoder *encoder = dev_get_drvdata(dev);
@@ -405,10 +404,9 @@ static int rotary_encoder_resume(struct device *dev)
return 0;
}
-#endif
static SIMPLE_DEV_PM_OPS(rotary_encoder_pm_ops,
- rotary_encoder_suspend, rotary_encoder_resume);
+ rotary_encoder_suspend, rotary_encoder_resume);
static struct platform_driver rotary_encoder_driver = {
.probe = rotary_encoder_probe,
--
2.6.0.rc2.230.g3dd15c0
Powered by blists - more mailing lists