From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: linux-input@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
Hans de Goede <hdegoede@redhat.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/6] Input: gpio_keys - annotate PM methods as __maybe_unused
Date: Fri, 28 Oct 2016 16:14:41 -0700 [thread overview]
Message-ID: <1477696485-6995-3-git-send-email-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <1477696485-6995-1-git-send-email-dmitry.torokhov@gmail.com>
Instead of using #ifdef, let's mark suspend and resume methods as
__maybe_unused to provide better compile coverage.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/keyboard/gpio_keys.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 890eb39..8f7c20b 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -814,8 +814,7 @@ static int gpio_keys_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
-static int gpio_keys_suspend(struct device *dev)
+static int __maybe_unused gpio_keys_suspend(struct device *dev)
{
struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev);
struct input_dev *input = ddata->input;
@@ -837,7 +836,7 @@ static int gpio_keys_suspend(struct device *dev)
return 0;
}
-static int gpio_keys_resume(struct device *dev)
+static int __maybe_unused gpio_keys_resume(struct device *dev)
{
struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev);
struct input_dev *input = ddata->input;
@@ -863,7 +862,6 @@ static int gpio_keys_resume(struct device *dev)
gpio_keys_report_state(ddata);
return 0;
}
-#endif
static SIMPLE_DEV_PM_OPS(gpio_keys_pm_ops, gpio_keys_suspend, gpio_keys_resume);
--
2.8.0.rc3.226.g39d4020
next prev parent reply other threads:[~2016-10-28 23:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-28 23:14 [PATCH 1/6] Input: gpio_keys_polled - keep button data constant Dmitry Torokhov
2016-10-28 23:14 ` [PATCH 2/6] Input: gpio_keys_polled - always use gpiod_get_value_cansleep Dmitry Torokhov
2016-10-28 23:14 ` Dmitry Torokhov [this message]
2016-10-28 23:14 ` [PATCH 4/6] Input: gpio_keys - fix leaking DT node references Dmitry Torokhov
2016-10-28 23:14 ` [PATCH 5/6] Input: gpio_keys - add support for GPIO descriptors Dmitry Torokhov
2016-10-29 8:38 ` Linus Walleij
2016-10-28 23:14 ` [PATCH 6/6] Input: gpio_keys - switch to using generic device properties Dmitry Torokhov
2016-10-31 10:44 ` Mika Westerberg
2016-10-31 10:41 ` [PATCH 1/6] Input: gpio_keys_polled - keep button data constant Mika Westerberg
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=1477696485-6995-3-git-send-email-dmitry.torokhov@gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=geert+renesas@glider.be \
--cc=hdegoede@redhat.com \
--cc=linus.walleij@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
/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
Powered by JetHome