mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
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>
This commit is contained in:
parent
db3dbd093a
commit
89f0f170fb
1 changed files with 4 additions and 8 deletions
|
@ -344,7 +344,7 @@ static int __devexit ske_keypad_remove(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM_SLEEP
|
||||||
static int ske_keypad_suspend(struct device *dev)
|
static int ske_keypad_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct platform_device *pdev = to_platform_device(dev);
|
||||||
|
@ -372,20 +372,16 @@ static int ske_keypad_resume(struct device *dev)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct dev_pm_ops ske_keypad_dev_pm_ops = {
|
|
||||||
.suspend = ske_keypad_suspend,
|
|
||||||
.resume = ske_keypad_resume,
|
|
||||||
};
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static SIMPLE_DEV_PM_OPS(ske_keypad_dev_pm_ops,
|
||||||
|
ske_keypad_suspend, ske_keypad_resume);
|
||||||
|
|
||||||
static struct platform_driver ske_keypad_driver = {
|
static struct platform_driver ske_keypad_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "nmk-ske-keypad",
|
.name = "nmk-ske-keypad",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
#ifdef CONFIG_PM
|
|
||||||
.pm = &ske_keypad_dev_pm_ops,
|
.pm = &ske_keypad_dev_pm_ops,
|
||||||
#endif
|
|
||||||
},
|
},
|
||||||
.remove = __devexit_p(ske_keypad_remove),
|
.remove = __devexit_p(ske_keypad_remove),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue