aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-25 01:01:43 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-26 14:20:52 -0400
commitb0010911d52dc7836a78c9f5c3b32ce4ac05b3c3 (patch)
tree29fe1a1e358b5dbe0e6155c1599bbe8cc876f78c
parent633aae23ff31bef692a70772652e753a0ae59b81 (diff)
Input: pxa27x_keypad - switch to using dev_pm_ops
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r--drivers/input/keyboard/pxa27x_keypad.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c
index 094323819398..c987cc75674c 100644
--- a/drivers/input/keyboard/pxa27x_keypad.c
+++ b/drivers/input/keyboard/pxa27x_keypad.c
@@ -389,8 +389,9 @@ static void pxa27x_keypad_close(struct input_dev *dev)
389} 389}
390 390
391#ifdef CONFIG_PM 391#ifdef CONFIG_PM
392static int pxa27x_keypad_suspend(struct platform_device *pdev, pm_message_t state) 392static int pxa27x_keypad_suspend(struct device *dev)
393{ 393{
394 struct platform_device *pdev = to_platform_device(dev);
394 struct pxa27x_keypad *keypad = platform_get_drvdata(pdev); 395 struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
395 396
396 clk_disable(keypad->clk); 397 clk_disable(keypad->clk);
@@ -401,8 +402,9 @@ static int pxa27x_keypad_suspend(struct platform_device *pdev, pm_message_t stat
401 return 0; 402 return 0;
402} 403}
403 404
404static int pxa27x_keypad_resume(struct platform_device *pdev) 405static int pxa27x_keypad_resume(struct device *dev)
405{ 406{
407 struct platform_device *pdev = to_platform_device(dev);
406 struct pxa27x_keypad *keypad = platform_get_drvdata(pdev); 408 struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
407 struct input_dev *input_dev = keypad->input_dev; 409 struct input_dev *input_dev = keypad->input_dev;
408 410
@@ -421,9 +423,11 @@ static int pxa27x_keypad_resume(struct platform_device *pdev)
421 423
422 return 0; 424 return 0;
423} 425}
424#else 426
425#define pxa27x_keypad_suspend NULL 427static const struct dev_pm_ops pxa27x_keypad_pm_ops = {
426#define pxa27x_keypad_resume NULL 428 .suspend = pxa27x_keypad_suspend,
429 .resume = pxa27x_keypad_resume,
430};
427#endif 431#endif
428 432
429static int __devinit pxa27x_keypad_probe(struct platform_device *pdev) 433static int __devinit pxa27x_keypad_probe(struct platform_device *pdev)
@@ -572,11 +576,12 @@ MODULE_ALIAS("platform:pxa27x-keypad");
572static struct platform_driver pxa27x_keypad_driver = { 576static struct platform_driver pxa27x_keypad_driver = {
573 .probe = pxa27x_keypad_probe, 577 .probe = pxa27x_keypad_probe,
574 .remove = __devexit_p(pxa27x_keypad_remove), 578 .remove = __devexit_p(pxa27x_keypad_remove),
575 .suspend = pxa27x_keypad_suspend,
576 .resume = pxa27x_keypad_resume,
577 .driver = { 579 .driver = {
578 .name = "pxa27x-keypad", 580 .name = "pxa27x-keypad",
579 .owner = THIS_MODULE, 581 .owner = THIS_MODULE,
582#ifdef CONFIG_PM
583 .pm = &pxa27x_keypad_pm_ops,
584#endif
580 }, 585 },
581}; 586};
582 587