Skip to content

Commit

Permalink
Input: atmel-wm97xx - convert to 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 Mar 4, 2012
1 parent 0c0c440 commit fa3e44f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions drivers/input/touchscreen/atmel-wm97xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,10 @@ static int __exit atmel_wm97xx_remove(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM
static int atmel_wm97xx_suspend(struct platform_device *pdev, pm_message_t msg)
#ifdef CONFIG_PM_SLEEP
static int atmel_wm97xx_suspend(struct *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct atmel_wm97xx *atmel_wm97xx = platform_get_drvdata(pdev);

ac97c_writel(atmel_wm97xx, IDR, AC97C_INT_CBEVT);
Expand All @@ -404,8 +405,9 @@ static int atmel_wm97xx_suspend(struct platform_device *pdev, pm_message_t msg)
return 0;
}

static int atmel_wm97xx_resume(struct platform_device *pdev)
static int atmel_wm97xx_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct atmel_wm97xx *atmel_wm97xx = platform_get_drvdata(pdev);
struct wm97xx *wm = atmel_wm97xx->wm;

Expand All @@ -416,19 +418,18 @@ static int atmel_wm97xx_resume(struct platform_device *pdev)

return 0;
}
#else
#define atmel_wm97xx_suspend NULL
#define atmel_wm97xx_resume NULL
#endif

static SIMPLE_DEV_PM_OPS(atmel_wm97xx_pm_ops,
atmel_wm97xx_suspend, atmel_wm97xx_resume);

static struct platform_driver atmel_wm97xx_driver = {
.remove = __exit_p(atmel_wm97xx_remove),
.driver = {
.name = "wm97xx-touch",
.owner = THIS_MODULE,
.pm = &atmel_wm97xx_pm_ops,
},
.suspend = atmel_wm97xx_suspend,
.resume = atmel_wm97xx_resume,
};
module_platform_driver(atmel_wm97xx_driver);

Expand Down

0 comments on commit fa3e44f

Please sign in to comment.