diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-04-21 01:33:08 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-04-21 02:06:45 -0400 |
commit | 0508c19a6fddd1ba5495004370e4fc2fd4a7d33a (patch) | |
tree | a4c98a2a843bc7cbe9816ddce409012ca98aebc7 /drivers/input | |
parent | 5cb727a86780fcac34de871cd12bea3f744d6be2 (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')
-rw-r--r-- | drivers/input/keyboard/matrix_keypad.c | 10 |
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) | |||
224 | disable_row_irqs(keypad); | 224 | disable_row_irqs(keypad); |
225 | } | 225 | } |
226 | 226 | ||
227 | #ifdef CONFIG_PM | 227 | #ifdef CONFIG_PM_SLEEP |
228 | static void matrix_keypad_enable_wakeup(struct matrix_keypad *keypad) | 228 | static void matrix_keypad_enable_wakeup(struct matrix_keypad *keypad) |
229 | { | 229 | { |
230 | const struct matrix_keypad_platform_data *pdata = keypad->pdata; | 230 | const struct matrix_keypad_platform_data *pdata = keypad->pdata; |
@@ -293,11 +293,11 @@ static int matrix_keypad_resume(struct device *dev) | |||
293 | 293 | ||
294 | return 0; | 294 | return 0; |
295 | } | 295 | } |
296 | |||
297 | static const SIMPLE_DEV_PM_OPS(matrix_keypad_pm_ops, | ||
298 | matrix_keypad_suspend, matrix_keypad_resume); | ||
299 | #endif | 296 | #endif |
300 | 297 | ||
298 | static SIMPLE_DEV_PM_OPS(matrix_keypad_pm_ops, | ||
299 | matrix_keypad_suspend, matrix_keypad_resume); | ||
300 | |||
301 | static int __devinit init_matrix_gpio(struct platform_device *pdev, | 301 | static int __devinit init_matrix_gpio(struct platform_device *pdev, |
302 | struct matrix_keypad *keypad) | 302 | struct matrix_keypad *keypad) |
303 | { | 303 | { |
@@ -491,9 +491,7 @@ static struct platform_driver matrix_keypad_driver = { | |||
491 | .driver = { | 491 | .driver = { |
492 | .name = "matrix-keypad", | 492 | .name = "matrix-keypad", |
493 | .owner = THIS_MODULE, | 493 | .owner = THIS_MODULE, |
494 | #ifdef CONFIG_PM | ||
495 | .pm = &matrix_keypad_pm_ops, | 494 | .pm = &matrix_keypad_pm_ops, |
496 | #endif | ||
497 | }, | 495 | }, |
498 | }; | 496 | }; |
499 | module_platform_driver(matrix_keypad_driver); | 497 | module_platform_driver(matrix_keypad_driver); |