summaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/nomadik-ske-keypad.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-01-22 23:27:54 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-01-23 00:02:18 -0800
commit89f0f170fbec6290637c3172cb08ddf31f211ef0 (patch)
treec550e3a4ab12dc1d8d832032b40847bbdad6836e /drivers/input/keyboard/nomadik-ske-keypad.c
parentdb3dbd093a7cbb201f169ace35f6cdff562e5a77 (diff)
downloadtalos-op-linux-89f0f170fbec6290637c3172cb08ddf31f211ef0.tar.gz
talos-op-linux-89f0f170fbec6290637c3172cb08ddf31f211ef0.zip
Input: nomadik-ske-keypad - convert to using SIMPLE_DEV_PM_OPS
Also proper guard for system suspend/resume methods is CONFIG_PM_SLEEP, not CONFIG_PM. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard/nomadik-ske-keypad.c')
-rw-r--r--drivers/input/keyboard/nomadik-ske-keypad.c12
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 a804f7b815bb..91c2fcb8ca4b 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),
};
OpenPOWER on IntegriCloud