From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Mike Rapoport <mike@compulab.co.il>
Cc: Eric Miao <eric.y.miao@gmail.com>, linux-input@vger.kernel.org
Subject: Re: A few changes to pxa27x_keypad
Date: Wed, 22 Jul 2009 23:30:44 -0700 [thread overview]
Message-ID: <20090723063044.GD2782@dtor-d630.eng.vmware.com> (raw)
In-Reply-To: <4A659C28.3040305@compulab.co.il>
On Tue, Jul 21, 2009 at 01:44:56PM +0300, Mike Rapoport wrote:
> Hi Dmitry,
>
> Dmitry Torokhov wrote:
> > Hi Eric,
> >
> > I made a few adjustments to the pxa27x_keypad driver and was wondering
> > if you would be able to give it a sping and check if I broke it or not.
>
> Apparently not :)
> Tested-by: Mike Rapoport <mike@compulab.co.il>
>
Cool, thanks for testing. I have another one for you then ;)
TIA!
--
Dmitry
Input: pxa27x_keypad - switch to using dev_pm_ops
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/input/keyboard/pxa27x_keypad.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c
index 0943238..847b40b 100644
--- a/drivers/input/keyboard/pxa27x_keypad.c
+++ b/drivers/input/keyboard/pxa27x_keypad.c
@@ -389,8 +389,9 @@ static void pxa27x_keypad_close(struct input_dev *dev)
}
#ifdef CONFIG_PM
-static int pxa27x_keypad_suspend(struct platform_device *pdev, pm_message_t state)
+static int pxa27x_keypad_suspend(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev);
struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
clk_disable(keypad->clk);
@@ -401,8 +402,9 @@ static int pxa27x_keypad_suspend(struct platform_device *pdev, pm_message_t stat
return 0;
}
-static int pxa27x_keypad_resume(struct platform_device *pdev)
+static int pxa27x_keypad_resume(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev);
struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
struct input_dev *input_dev = keypad->input_dev;
@@ -421,9 +423,11 @@ static int pxa27x_keypad_resume(struct platform_device *pdev)
return 0;
}
-#else
-#define pxa27x_keypad_suspend NULL
-#define pxa27x_keypad_resume NULL
+
+static const struct dev_pm_ops pxa27x_keypad_pm_ops = {
+ .suspend = pxa27x_keypad_suspend,
+ .resume = pxa27x_keypad_resume,
+};
#endif
static int __devinit pxa27x_keypad_probe(struct platform_device *pdev)
@@ -577,6 +581,9 @@ static struct platform_driver pxa27x_keypad_driver = {
.driver = {
.name = "pxa27x-keypad",
.owner = THIS_MODULE,
+#ifdef CONFIG_PM
+ .pm = &pxa27x_keypad_pm_ops,
+#endif
},
};
next prev parent reply other threads:[~2009-07-23 6:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 8:08 A few changes to pxa27x_keypad Dmitry Torokhov
2009-07-21 10:44 ` Mike Rapoport
2009-07-23 6:30 ` Dmitry Torokhov [this message]
2009-07-23 7:28 ` Dmitry Torokhov
2009-07-23 7:36 ` Dmitry Torokhov
2009-09-04 5:20 ` Dmitry Torokhov
2009-09-04 7:45 ` Eric Miao
2009-09-04 8:17 ` Dmitry Torokhov
2009-07-23 9:05 ` Mike Rapoport
2009-07-23 9:24 ` Dmitry Torokhov
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=20090723063044.GD2782@dtor-d630.eng.vmware.com \
--to=dmitry.torokhov@gmail.com \
--cc=eric.y.miao@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=mike@compulab.co.il \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.