summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/matrix_keypad.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-04-20 22:33:08 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-04-20 23:06:45 -0700
commit0508c19a6fddd1ba5495004370e4fc2fd4a7d33a (patch)
treea4c98a2a843bc7cbe9816ddce409012ca98aebc7 /drivers/input/keyboard/matrix_keypad.c
parent5cb727a86780fcac34de871cd12bea3f744d6be2 (diff)
Input: matrix-keypad - fix 'duplicate const' sparse warning
SIMPLE_DEV_PM_OPS already defines constant dev_pm_ops. Also guard PM methods with CONFIG_PM_SLEEP and get rid of some unneeded #ifdefs. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard/matrix_keypad.c')
-rw-r--r--drivers/input/keyboard/matrix_keypad.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c
index 9b223d73de32..8714d680e2ed 100644
--- a/drivers/input/keyboard/matrix_keypad.c
+++ b/drivers/input/keyboard/matrix_keypad.c
@@ -224,7 +224,7 @@ static void matrix_keypad_stop(struct input_dev *dev)
disable_row_irqs(keypad);
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static void matrix_keypad_enable_wakeup(struct matrix_keypad *keypad)
{
const struct matrix_keypad_platform_data *pdata = keypad->pdata;
@@ -293,11 +293,11 @@ static int matrix_keypad_resume(struct device *dev)
return 0;
}
-
-static const SIMPLE_DEV_PM_OPS(matrix_keypad_pm_ops,
- matrix_keypad_suspend, matrix_keypad_resume);
#endif
+static SIMPLE_DEV_PM_OPS(matrix_keypad_pm_ops,
+ matrix_keypad_suspend, matrix_keypad_resume);
+
static int __devinit init_matrix_gpio(struct platform_device *pdev,
struct matrix_keypad *keypad)
{
@@ -491,9 +491,7 @@ static struct platform_driver matrix_keypad_driver = {
.driver = {
.name = "matrix-keypad",
.owner = THIS_MODULE,
-#ifdef CONFIG_PM
.pm = &matrix_keypad_pm_ops,
-#endif
},
};
module_platform_driver(matrix_keypad_driver);