From: Tobias Doerffel <tobias.doerffel@gmail.com>
To: linux-input@vger.kernel.org
Cc: Tobias Doerffel <tobias.doerffel@gmail.com>
Subject: [PATCH] Input: twl4030-vibra - depend on CONFIG_PM_SLEEP for suspend/resume functions
Date: Sun, 30 May 2010 00:31:48 +0200 [thread overview]
Message-ID: <1275172308-15093-1-git-send-email-tobias.doerffel@gmail.com> (raw)
When building a kernel with CONFIG_PM=y but neither suspend nor
hibernate support, the compiler complains about the static functions
twl4030_vibra_suspend() and twl4030_vibra_resume() not being used:
drivers/input/misc/twl4030-vibra.c:176:12: warning: ‘twl4030_vibra_suspend’ defined but not used
drivers/input/misc/twl4030-vibra.c:187:12: warning: ‘twl4030_vibra_resume’ defined but not used
Depending on CONFIG_PM_SLEEP rather than CONFIG_PM fixes the issue.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
---
drivers/input/misc/twl4030-vibra.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c
index 4f9b2af..3600bca 100644
--- a/drivers/input/misc/twl4030-vibra.c
+++ b/drivers/input/misc/twl4030-vibra.c
@@ -172,7 +172,7 @@ static void twl4030_vibra_close(struct input_dev *input)
}
/*** Module ***/
-#if CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int twl4030_vibra_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
@@ -273,7 +273,7 @@ static struct platform_driver twl4030_vibra_driver = {
.driver = {
.name = "twl4030_codec_vibra",
.owner = THIS_MODULE,
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
.pm = &twl4030_vibra_pm_ops,
#endif
},
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
reply other threads:[~2010-05-29 22:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1275172308-15093-1-git-send-email-tobias.doerffel@gmail.com \
--to=tobias.doerffel@gmail.com \
--cc=linux-input@vger.kernel.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).