Skip to content

Commit

Permalink
Input: samsung-keypad - switch to using SIMPLE_DEV_PM_OPS
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed Nov 10, 2011
1 parent 7968a5d commit 400bf29
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions drivers/input/keyboard/samsung-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ static int __devexit samsung_keypad_remove(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static void samsung_keypad_toggle_wakeup(struct samsung_keypad *keypad,
bool enable)
{
Expand Down Expand Up @@ -440,13 +440,11 @@ static int samsung_keypad_resume(struct device *dev)

return 0;
}

static const struct dev_pm_ops samsung_keypad_pm_ops = {
.suspend = samsung_keypad_suspend,
.resume = samsung_keypad_resume,
};
#endif

static SIMPLE_DEV_PM_OPS(samsung_keypad_pm_ops,
samsung_keypad_suspend, samsung_keypad_resume);

static struct platform_device_id samsung_keypad_driver_ids[] = {
{
.name = "samsung-keypad",
Expand All @@ -465,9 +463,7 @@ static struct platform_driver samsung_keypad_driver = {
.driver = {
.name = "samsung-keypad",
.owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &samsung_keypad_pm_ops,
#endif
},
.id_table = samsung_keypad_driver_ids,
};
Expand Down

0 comments on commit 400bf29

Please sign in to comment.