Skip to contentSkip to conversation

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

PATCH In review Dmitry Torokhov 2 participants 2 messages May 3, 2011 – May 17, 2011

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: sc_keysc - only compile PM code if PM is enabled

---

 drivers/input/keyboard/sh_keysc.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/input/keyboard/sh_keysc.c +4 -4
index cb4f258..834cf98 100644
@@ -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,
Acked-by on v1 1/1
#1 lore raw

Hi Dmitry,

Quoted 1 line · Dmitry Torokhov

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:

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

Thanks for your help!

/ magnus