Commit 0508c19a authored by Dmitry Torokhov's avatar Dmitry Torokhov

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: default avatarDmitry Torokhov <dtor@mail.ru>
parent 5cb727a8
...@@ -224,7 +224,7 @@ static void matrix_keypad_stop(struct input_dev *dev) ...@@ -224,7 +224,7 @@ static void matrix_keypad_stop(struct input_dev *dev)
disable_row_irqs(keypad); disable_row_irqs(keypad);
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP
static void matrix_keypad_enable_wakeup(struct matrix_keypad *keypad) static void matrix_keypad_enable_wakeup(struct matrix_keypad *keypad)
{ {
const struct matrix_keypad_platform_data *pdata = keypad->pdata; const struct matrix_keypad_platform_data *pdata = keypad->pdata;
...@@ -293,11 +293,11 @@ static int matrix_keypad_resume(struct device *dev) ...@@ -293,11 +293,11 @@ static int matrix_keypad_resume(struct device *dev)
return 0; return 0;
} }
static const SIMPLE_DEV_PM_OPS(matrix_keypad_pm_ops,
matrix_keypad_suspend, matrix_keypad_resume);
#endif #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, static int __devinit init_matrix_gpio(struct platform_device *pdev,
struct matrix_keypad *keypad) struct matrix_keypad *keypad)
{ {
...@@ -491,9 +491,7 @@ static struct platform_driver matrix_keypad_driver = { ...@@ -491,9 +491,7 @@ static struct platform_driver matrix_keypad_driver = {
.driver = { .driver = {
.name = "matrix-keypad", .name = "matrix-keypad",
.owner = THIS_MODULE, .owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &matrix_keypad_pm_ops, .pm = &matrix_keypad_pm_ops,
#endif
}, },
}; };
module_platform_driver(matrix_keypad_driver); module_platform_driver(matrix_keypad_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment