linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dmitry.torokhov@gmail.com (Dmitry Torokhov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] Input: rotary_encoder - mark PM methods as __maybe_unused
Date: Mon, 18 Jan 2016 09:41:39 -0800	[thread overview]
Message-ID: <1453138902-11657-2-git-send-email-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <1453138902-11657-1-git-send-email-dmitry.torokhov@gmail.com>

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@gmail.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

  reply	other threads:[~2016-01-18 17:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18 17:41 [PATCH 0/4] rotary-encoder: use generic device properties Dmitry Torokhov
2016-01-18 17:41 ` Dmitry Torokhov [this message]
2016-01-18 17:41 ` [PATCH 2/4] Input: rotary_encoder - convert to use gpiod API Dmitry Torokhov
2016-01-18 17:41 ` [PATCH 3/4] Input: rotary_encoder - use input_set_capability() Dmitry Torokhov
2016-01-18 17:41 ` [PATCH 4/4] Input: rotary_encoder - move away from platform data structure Dmitry Torokhov
2016-01-23 18:01 ` [PATCH 0/4] rotary-encoder: use generic device properties Robert Jarzmik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453138902-11657-2-git-send-email-dmitry.torokhov@gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).