Commit f3761c07 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: twl4030-vibra - use proper guard for PM methods

On m68k:

drivers/input/misc/twl4030-vibra.c:175:5: warning: "CONFIG_PM" is not
defined

We should use #ifdef instead of #if and also check CONFIG_PM_SLEEP
instead of CONFIG_PM.
Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 02dfc496
...@@ -172,7 +172,7 @@ static void twl4030_vibra_close(struct input_dev *input) ...@@ -172,7 +172,7 @@ static void twl4030_vibra_close(struct input_dev *input)
} }
/*** Module ***/ /*** Module ***/
#if CONFIG_PM #if CONFIG_PM_SLEEP
static int twl4030_vibra_suspend(struct device *dev) static int twl4030_vibra_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
...@@ -189,10 +189,10 @@ static int twl4030_vibra_resume(struct device *dev) ...@@ -189,10 +189,10 @@ static int twl4030_vibra_resume(struct device *dev)
vibra_disable_leds(); vibra_disable_leds();
return 0; return 0;
} }
#endif
static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops, static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
twl4030_vibra_suspend, twl4030_vibra_resume); twl4030_vibra_suspend, twl4030_vibra_resume);
#endif
static int __devinit twl4030_vibra_probe(struct platform_device *pdev) static int __devinit twl4030_vibra_probe(struct platform_device *pdev)
{ {
...@@ -273,9 +273,7 @@ static struct platform_driver twl4030_vibra_driver = { ...@@ -273,9 +273,7 @@ static struct platform_driver twl4030_vibra_driver = {
.driver = { .driver = {
.name = "twl4030-vibra", .name = "twl4030-vibra",
.owner = THIS_MODULE, .owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &twl4030_vibra_pm_ops, .pm = &twl4030_vibra_pm_ops,
#endif
}, },
}; };
module_platform_driver(twl4030_vibra_driver); module_platform_driver(twl4030_vibra_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment