summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/pxa27x_keypad.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-06-10 22:10:07 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-06-18 22:56:52 -0700
commitf9f6def88ace892f9f90f639664f0e203bafdb22 (patch)
tree6f33fd883837aba1177f5d36f29bdc4a4bc0539a /drivers/input/keyboard/pxa27x_keypad.c
parente4156979c7d34e5197b16fa31c1c7549eae675e5 (diff)
Input: pxa27x-keypad - convert to using SIMPLE_DEV_PM_OPS
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard/pxa27x_keypad.c')
-rw-r--r--drivers/input/keyboard/pxa27x_keypad.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c
index 533fd6c7c3c8..aa17cf269aa8 100644
--- a/drivers/input/keyboard/pxa27x_keypad.c
+++ b/drivers/input/keyboard/pxa27x_keypad.c
@@ -661,7 +661,7 @@ static void pxa27x_keypad_close(struct input_dev *dev)
clk_disable_unprepare(keypad->clk);
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int pxa27x_keypad_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
@@ -705,13 +705,12 @@ static int pxa27x_keypad_resume(struct device *dev)
return 0;
}
-
-static const struct dev_pm_ops pxa27x_keypad_pm_ops = {
- .suspend = pxa27x_keypad_suspend,
- .resume = pxa27x_keypad_resume,
-};
#endif
+static SIMPLE_DEV_PM_OPS(pxa27x_keypad_pm_ops,
+ pxa27x_keypad_suspend, pxa27x_keypad_resume);
+
+
static int pxa27x_keypad_probe(struct platform_device *pdev)
{
struct pxa27x_keypad_platform_data *pdata = pdev->dev.platform_data;
@@ -872,9 +871,7 @@ static struct platform_driver pxa27x_keypad_driver = {
.name = "pxa27x-keypad",
.of_match_table = of_match_ptr(pxa27x_keypad_dt_match),
.owner = THIS_MODULE,
-#ifdef CONFIG_PM
.pm = &pxa27x_keypad_pm_ops,
-#endif
},
};
module_platform_driver(pxa27x_keypad_driver);