From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Sundar Iyer <sundar.iyer@stericsson.com>
Cc: linux-input@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 2/2] Input: nomadik-ske-keypad - convert to using SIMPLE_DEV_PM_OPS
Date: Tue, 10 Jan 2012 23:35:37 -0800 [thread overview]
Message-ID: <20120111073537.18870.17178.stgit@hammer.corenet.prv> (raw)
In-Reply-To: <20120111073531.18870.48568.stgit@hammer.corenet.prv>
Also proper guard for system suspend/resume methods is CONFIG_PM_SLEEP,
not CONFIG_PM.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/input/keyboard/nomadik-ske-keypad.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c
index bc9f339..101e245 100644
--- a/drivers/input/keyboard/nomadik-ske-keypad.c
+++ b/drivers/input/keyboard/nomadik-ske-keypad.c
@@ -344,7 +344,7 @@ static int __devexit ske_keypad_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int ske_keypad_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
@@ -372,20 +372,16 @@ static int ske_keypad_resume(struct device *dev)
return 0;
}
-
-static const struct dev_pm_ops ske_keypad_dev_pm_ops = {
- .suspend = ske_keypad_suspend,
- .resume = ske_keypad_resume,
-};
#endif
+static SIMPLE_DEV_PM_OPS(ske_keypad_dev_pm_ops,
+ ske_keypad_suspend, ske_keypad_resume);
+
static struct platform_driver ske_keypad_driver = {
.driver = {
.name = "nmk-ske-keypad",
.owner = THIS_MODULE,
-#ifdef CONFIG_PM
.pm = &ske_keypad_dev_pm_ops,
-#endif
},
.remove = __devexit_p(ske_keypad_remove),
};
next prev parent reply other threads:[~2012-01-11 7:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-11 7:35 [PATCH 1/2] Input: nomadik-ske-keypad - do not assign driver's probe() method Dmitry Torokhov
2012-01-11 7:35 ` Dmitry Torokhov [this message]
2012-01-11 9:25 ` [PATCH 2/2] Input: nomadik-ske-keypad - convert to using SIMPLE_DEV_PM_OPS Linus Walleij
2012-01-11 9:24 ` [PATCH 1/2] Input: nomadik-ske-keypad - do not assign driver's probe() method Linus Walleij
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=20120111073537.18870.17178.stgit@hammer.corenet.prv \
--to=dmitry.torokhov@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=sundar.iyer@stericsson.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;
as well as URLs for NNTP newsgroup(s).