diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-23 02:27:54 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-23 03:02:18 -0500 |
commit | 89f0f170fbec6290637c3172cb08ddf31f211ef0 (patch) | |
tree | c550e3a4ab12dc1d8d832032b40847bbdad6836e | |
parent | db3dbd093a7cbb201f169ace35f6cdff562e5a77 (diff) |
Input: nomadik-ske-keypad - convert to using SIMPLE_DEV_PM_OPS
Also proper guard for system suspend/resume methods is CONFIG_PM_SLEEP,
not CONFIG_PM.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r-- | drivers/input/keyboard/nomadik-ske-keypad.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index a804f7b815bb..91c2fcb8ca4b 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c | |||
@@ -344,7 +344,7 @@ static int __devexit ske_keypad_remove(struct platform_device *pdev) | |||
344 | return 0; | 344 | return 0; |
345 | } | 345 | } |
346 | 346 | ||
347 | #ifdef CONFIG_PM | 347 | #ifdef CONFIG_PM_SLEEP |
348 | static int ske_keypad_suspend(struct device *dev) | 348 | static int ske_keypad_suspend(struct device *dev) |
349 | { | 349 | { |
350 | struct platform_device *pdev = to_platform_device(dev); | 350 | struct platform_device *pdev = to_platform_device(dev); |
@@ -372,20 +372,16 @@ static int ske_keypad_resume(struct device *dev) | |||
372 | 372 | ||
373 | return 0; | 373 | return 0; |
374 | } | 374 | } |
375 | |||
376 | static const struct dev_pm_ops ske_keypad_dev_pm_ops = { | ||
377 | .suspend = ske_keypad_suspend, | ||
378 | .resume = ske_keypad_resume, | ||
379 | }; | ||
380 | #endif | 375 | #endif |
381 | 376 | ||
377 | static SIMPLE_DEV_PM_OPS(ske_keypad_dev_pm_ops, | ||
378 | ske_keypad_suspend, ske_keypad_resume); | ||
379 | |||
382 | static struct platform_driver ske_keypad_driver = { | 380 | static struct platform_driver ske_keypad_driver = { |
383 | .driver = { | 381 | .driver = { |
384 | .name = "nmk-ske-keypad", | 382 | .name = "nmk-ske-keypad", |
385 | .owner = THIS_MODULE, | 383 | .owner = THIS_MODULE, |
386 | #ifdef CONFIG_PM | ||
387 | .pm = &ske_keypad_dev_pm_ops, | 384 | .pm = &ske_keypad_dev_pm_ops, |
388 | #endif | ||
389 | }, | 385 | }, |
390 | .remove = __devexit_p(ske_keypad_remove), | 386 | .remove = __devexit_p(ske_keypad_remove), |
391 | }; | 387 | }; |