Skip to content

Commit

Permalink
Input: pxa27x-keypad - convert to using SIMPLE_DEV_PM_OPS
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Dmitry Torokhov committed Jun 19, 2013
1 parent e415697 commit f9f6def
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions drivers/input/keyboard/pxa27x_keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ static void pxa27x_keypad_close(struct input_dev *dev)
clk_disable_unprepare(keypad->clk);
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int pxa27x_keypad_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
Expand Down Expand Up @@ -705,13 +705,12 @@ static int pxa27x_keypad_resume(struct device *dev)

return 0;
}

static const struct dev_pm_ops pxa27x_keypad_pm_ops = {
.suspend = pxa27x_keypad_suspend,
.resume = pxa27x_keypad_resume,
};
#endif

static SIMPLE_DEV_PM_OPS(pxa27x_keypad_pm_ops,
pxa27x_keypad_suspend, pxa27x_keypad_resume);


static int pxa27x_keypad_probe(struct platform_device *pdev)
{
struct pxa27x_keypad_platform_data *pdata = pdev->dev.platform_data;
Expand Down Expand Up @@ -872,9 +871,7 @@ static struct platform_driver pxa27x_keypad_driver = {
.name = "pxa27x-keypad",
.of_match_table = of_match_ptr(pxa27x_keypad_dt_match),
.owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &pxa27x_keypad_pm_ops,
#endif
},
};
module_platform_driver(pxa27x_keypad_driver);
Expand Down

0 comments on commit f9f6def

Please sign in to comment.