aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-02-24 03:51:40 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-02-24 03:54:29 -0500
commitf3761c0779b62276b5bf84532a81d5dc49bd721f (patch)
treefca99792f6dc66b9f55ec12dbf02d5841547f03b /drivers/input
parent02dfc496800dfaf17b650256642f3df86653fe97 (diff)
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: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/twl4030-vibra.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c
index 37651373a95b..f3bc4189a7ba 100644
--- a/drivers/input/misc/twl4030-vibra.c
+++ b/drivers/input/misc/twl4030-vibra.c
@@ -172,7 +172,7 @@ static void twl4030_vibra_close(struct input_dev *input)
172} 172}
173 173
174/*** Module ***/ 174/*** Module ***/
175#if CONFIG_PM 175#if CONFIG_PM_SLEEP
176static int twl4030_vibra_suspend(struct device *dev) 176static int twl4030_vibra_suspend(struct device *dev)
177{ 177{
178 struct platform_device *pdev = to_platform_device(dev); 178 struct platform_device *pdev = to_platform_device(dev);
@@ -189,10 +189,10 @@ static int twl4030_vibra_resume(struct device *dev)
189 vibra_disable_leds(); 189 vibra_disable_leds();
190 return 0; 190 return 0;
191} 191}
192#endif
192 193
193static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops, 194static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
194 twl4030_vibra_suspend, twl4030_vibra_resume); 195 twl4030_vibra_suspend, twl4030_vibra_resume);
195#endif
196 196
197static int __devinit twl4030_vibra_probe(struct platform_device *pdev) 197static int __devinit twl4030_vibra_probe(struct platform_device *pdev)
198{ 198{
@@ -273,9 +273,7 @@ static struct platform_driver twl4030_vibra_driver = {
273 .driver = { 273 .driver = {
274 .name = "twl4030-vibra", 274 .name = "twl4030-vibra",
275 .owner = THIS_MODULE, 275 .owner = THIS_MODULE,
276#ifdef CONFIG_PM
277 .pm = &twl4030_vibra_pm_ops, 276 .pm = &twl4030_vibra_pm_ops,
278#endif
279 }, 277 },
280}; 278};
281module_platform_driver(twl4030_vibra_driver); 279module_platform_driver(twl4030_vibra_driver);