diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-11-08 02:59:35 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-11-10 00:23:36 -0500 |
commit | 400bf2995be617474ebc4b2a0989f2b0a0e498cf (patch) | |
tree | 90852c80a11d57f27f5240b0b0a1a1418dcb6549 /drivers/input/keyboard/samsung-keypad.c | |
parent | 7968a5dd492ccc38345013e534ad4c8d6eb60ed1 (diff) |
Input: samsung-keypad - switch to using SIMPLE_DEV_PM_OPS
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard/samsung-keypad.c')
-rw-r--r-- | drivers/input/keyboard/samsung-keypad.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c index f689f49e3109..d244fdf9ecdf 100644 --- a/drivers/input/keyboard/samsung-keypad.c +++ b/drivers/input/keyboard/samsung-keypad.c | |||
@@ -381,7 +381,7 @@ static int __devexit samsung_keypad_remove(struct platform_device *pdev) | |||
381 | return 0; | 381 | return 0; |
382 | } | 382 | } |
383 | 383 | ||
384 | #ifdef CONFIG_PM | 384 | #ifdef CONFIG_PM_SLEEP |
385 | static void samsung_keypad_toggle_wakeup(struct samsung_keypad *keypad, | 385 | static void samsung_keypad_toggle_wakeup(struct samsung_keypad *keypad, |
386 | bool enable) | 386 | bool enable) |
387 | { | 387 | { |
@@ -440,13 +440,11 @@ static int samsung_keypad_resume(struct device *dev) | |||
440 | 440 | ||
441 | return 0; | 441 | return 0; |
442 | } | 442 | } |
443 | |||
444 | static const struct dev_pm_ops samsung_keypad_pm_ops = { | ||
445 | .suspend = samsung_keypad_suspend, | ||
446 | .resume = samsung_keypad_resume, | ||
447 | }; | ||
448 | #endif | 443 | #endif |
449 | 444 | ||
445 | static SIMPLE_DEV_PM_OPS(samsung_keypad_pm_ops, | ||
446 | samsung_keypad_suspend, samsung_keypad_resume); | ||
447 | |||
450 | static struct platform_device_id samsung_keypad_driver_ids[] = { | 448 | static struct platform_device_id samsung_keypad_driver_ids[] = { |
451 | { | 449 | { |
452 | .name = "samsung-keypad", | 450 | .name = "samsung-keypad", |
@@ -465,9 +463,7 @@ static struct platform_driver samsung_keypad_driver = { | |||
465 | .driver = { | 463 | .driver = { |
466 | .name = "samsung-keypad", | 464 | .name = "samsung-keypad", |
467 | .owner = THIS_MODULE, | 465 | .owner = THIS_MODULE, |
468 | #ifdef CONFIG_PM | ||
469 | .pm = &samsung_keypad_pm_ops, | 466 | .pm = &samsung_keypad_pm_ops, |
470 | #endif | ||
471 | }, | 467 | }, |
472 | .id_table = samsung_keypad_driver_ids, | 468 | .id_table = samsung_keypad_driver_ids, |
473 | }; | 469 | }; |