From: Dmitry Torokhov Date: Mon, 23 Jan 2012 07:27:54 +0000 (-0800) Subject: Input: nomadik-ske-keypad - convert to using SIMPLE_DEV_PM_OPS X-Git-Tag: v3.5-rc6~10^2~15^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89f0f170fbec6290637c3172cb08ddf31f211ef0;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index a804f7b..91c2fcb 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c @@ -344,7 +344,7 @@ static int __devexit ske_keypad_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int ske_keypad_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -372,20 +372,16 @@ static int ske_keypad_resume(struct device *dev) return 0; } - -static const struct dev_pm_ops ske_keypad_dev_pm_ops = { - .suspend = ske_keypad_suspend, - .resume = ske_keypad_resume, -}; #endif +static SIMPLE_DEV_PM_OPS(ske_keypad_dev_pm_ops, + ske_keypad_suspend, ske_keypad_resume); + static struct platform_driver ske_keypad_driver = { .driver = { .name = "nmk-ske-keypad", .owner = THIS_MODULE, -#ifdef CONFIG_PM .pm = &ske_keypad_dev_pm_ops, -#endif }, .remove = __devexit_p(ske_keypad_remove), };