diff mbox

Input: sc_keysc - only compile PM code if PM is enabled

Message ID 20110503074002.2380.6883.stgit@hammer.corenet.prv (mailing list archive)
State Accepted
Commit 9cc7c80b57c66d08e67f297169783d1f07288066
Headers show

Commit Message

Dmitry Torokhov May 3, 2011, 7:40 a.m. UTC
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/keyboard/sh_keysc.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


--
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

Comments

Magnus Damm May 17, 2011, 9:42 a.m. UTC | #1
Hi Dmitry,

On Tue, May 3, 2011 at 4:40 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

I just tried linux-next 20110517 with Suspend-to-RAM patches on AP4EVB
and it seems to work well.

So for these patches...
9cc7c80 Input: sh_keysc - only compile PM code if PM is enabled
12d0cef70 Input: sh_keysc - make sh_keysc_device_driver static

... feel free to add:
Acked-by: Magnus Damm <damm@opensource.se>

If it means extra work and little gain feel free to leave them as-is too.

Thanks for your help!

/ magnus
--
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
diff mbox

Patch

diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c
index cb4f258..834cf98 100644
--- a/drivers/input/keyboard/sh_keysc.c
+++ b/drivers/input/keyboard/sh_keysc.c
@@ -291,6 +291,7 @@  static int __devexit sh_keysc_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#if CONFIG_PM_SLEEP
 static int sh_keysc_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -323,11 +324,10 @@  static int sh_keysc_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
-static const struct dev_pm_ops sh_keysc_dev_pm_ops = {
-	.suspend = sh_keysc_suspend,
-	.resume = sh_keysc_resume,
-};
+static SIMPLE_DEV_PM_OPS(sh_keysc_dev_pm_ops,
+			 sh_keysc_suspend, sh_keysc_resume);
 
 static struct platform_driver sh_keysc_device_driver = {
 	.probe		= sh_keysc_probe,