aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2014-11-02 02:02:46 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-11-02 02:10:06 -0500
commit97a652a852b821dd2a95b54da8c870b7b38df0e8 (patch)
tree95c4b9db2525dd829cf2f26ae196694af9aca377
parent6bdd2fd1ed6f66597f3cff75c1bb1569beec2fc9 (diff)
Input: misc - use __maybe_unused instead of ifdef around suspend/resume
Use __maybe_unused instead of ifdef guards around suspend/resume functions, in order to increase build coverage and fix build warnings. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/misc/88pm860x_onkey.c6
-rw-r--r--drivers/input/misc/ad714x-i2c.c6
-rw-r--r--drivers/input/misc/ad714x-spi.c6
-rw-r--r--drivers/input/misc/adxl34x-i2c.c6
-rw-r--r--drivers/input/misc/adxl34x-spi.c6
-rw-r--r--drivers/input/misc/drv260x.c6
-rw-r--r--drivers/input/misc/drv2667.c6
-rw-r--r--drivers/input/misc/gp2ap002a00f.c6
-rw-r--r--drivers/input/misc/kxtj9.c6
-rw-r--r--drivers/input/misc/max77693-haptic.c6
-rw-r--r--drivers/input/misc/max8925_onkey.c6
-rw-r--r--drivers/input/misc/max8997_haptic.c4
-rw-r--r--drivers/input/misc/palmas-pwrbutton.c6
-rw-r--r--drivers/input/misc/pm8xxx-vibrator.c4
-rw-r--r--drivers/input/misc/pmic8xxx-pwrkey.c6
-rw-r--r--drivers/input/misc/pwm-beeper.c6
-rw-r--r--drivers/input/misc/sirfsoc-onkey.c4
-rw-r--r--drivers/input/misc/twl4030-vibra.c6
-rw-r--r--drivers/input/misc/twl6040-vibra.c4
19 files changed, 35 insertions, 71 deletions
diff --git a/drivers/input/misc/88pm860x_onkey.c b/drivers/input/misc/88pm860x_onkey.c
index 220ce0fa15d9..3cbd1b309220 100644
--- a/drivers/input/misc/88pm860x_onkey.c
+++ b/drivers/input/misc/88pm860x_onkey.c
@@ -112,8 +112,7 @@ static int pm860x_onkey_probe(struct platform_device *pdev)
112 return 0; 112 return 0;
113} 113}
114 114
115#ifdef CONFIG_PM_SLEEP 115static int __maybe_unused pm860x_onkey_suspend(struct device *dev)
116static int pm860x_onkey_suspend(struct device *dev)
117{ 116{
118 struct platform_device *pdev = to_platform_device(dev); 117 struct platform_device *pdev = to_platform_device(dev);
119 struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); 118 struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent);
@@ -122,7 +121,7 @@ static int pm860x_onkey_suspend(struct device *dev)
122 chip->wakeup_flag |= 1 << PM8607_IRQ_ONKEY; 121 chip->wakeup_flag |= 1 << PM8607_IRQ_ONKEY;
123 return 0; 122 return 0;
124} 123}
125static int pm860x_onkey_resume(struct device *dev) 124static int __maybe_unused pm860x_onkey_resume(struct device *dev)
126{ 125{
127 struct platform_device *pdev = to_platform_device(dev); 126 struct platform_device *pdev = to_platform_device(dev);
128 struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); 127 struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent);
@@ -131,7 +130,6 @@ static int pm860x_onkey_resume(struct device *dev)
131 chip->wakeup_flag &= ~(1 << PM8607_IRQ_ONKEY); 130 chip->wakeup_flag &= ~(1 << PM8607_IRQ_ONKEY);
132 return 0; 131 return 0;
133} 132}
134#endif
135 133
136static SIMPLE_DEV_PM_OPS(pm860x_onkey_pm_ops, pm860x_onkey_suspend, pm860x_onkey_resume); 134static SIMPLE_DEV_PM_OPS(pm860x_onkey_pm_ops, pm860x_onkey_suspend, pm860x_onkey_resume);
137 135
diff --git a/drivers/input/misc/ad714x-i2c.c b/drivers/input/misc/ad714x-i2c.c
index e0f522516ef5..189bdc8e91a5 100644
--- a/drivers/input/misc/ad714x-i2c.c
+++ b/drivers/input/misc/ad714x-i2c.c
@@ -13,17 +13,15 @@
13#include <linux/pm.h> 13#include <linux/pm.h>
14#include "ad714x.h" 14#include "ad714x.h"
15 15
16#ifdef CONFIG_PM_SLEEP 16static int __maybe_unused ad714x_i2c_suspend(struct device *dev)
17static int ad714x_i2c_suspend(struct device *dev)
18{ 17{
19 return ad714x_disable(i2c_get_clientdata(to_i2c_client(dev))); 18 return ad714x_disable(i2c_get_clientdata(to_i2c_client(dev)));
20} 19}
21 20
22static int ad714x_i2c_resume(struct device *dev) 21static int __maybe_unused ad714x_i2c_resume(struct device *dev)
23{ 22{
24 return ad714x_enable(i2c_get_clientdata(to_i2c_client(dev))); 23 return ad714x_enable(i2c_get_clientdata(to_i2c_client(dev)));
25} 24}
26#endif
27 25
28static SIMPLE_DEV_PM_OPS(ad714x_i2c_pm, ad714x_i2c_suspend, ad714x_i2c_resume); 26static SIMPLE_DEV_PM_OPS(ad714x_i2c_pm, ad714x_i2c_suspend, ad714x_i2c_resume);
29 27
diff --git a/drivers/input/misc/ad714x-spi.c b/drivers/input/misc/ad714x-spi.c
index 3a90b710e309..a79e50b58bf5 100644
--- a/drivers/input/misc/ad714x-spi.c
+++ b/drivers/input/misc/ad714x-spi.c
@@ -16,17 +16,15 @@
16#define AD714x_SPI_CMD_PREFIX 0xE000 /* bits 15:11 */ 16#define AD714x_SPI_CMD_PREFIX 0xE000 /* bits 15:11 */
17#define AD714x_SPI_READ BIT(10) 17#define AD714x_SPI_READ BIT(10)
18 18
19#ifdef CONFIG_PM_SLEEP 19static int __maybe_unused ad714x_spi_suspend(struct device *dev)
20static int ad714x_spi_suspend(struct device *dev)
21{ 20{
22 return ad714x_disable(spi_get_drvdata(to_spi_device(dev))); 21 return ad714x_disable(spi_get_drvdata(to_spi_device(dev)));
23} 22}
24 23
25static int ad714x_spi_resume(struct device *dev) 24static int __maybe_unused ad714x_spi_resume(struct device *dev)
26{ 25{
27 return ad714x_enable(spi_get_drvdata(to_spi_device(dev))); 26 return ad714x_enable(spi_get_drvdata(to_spi_device(dev)));
28} 27}
29#endif
30 28
31static SIMPLE_DEV_PM_OPS(ad714x_spi_pm, ad714x_spi_suspend, ad714x_spi_resume); 29static SIMPLE_DEV_PM_OPS(ad714x_spi_pm, ad714x_spi_suspend, ad714x_spi_resume);
32 30
diff --git a/drivers/input/misc/adxl34x-i2c.c b/drivers/input/misc/adxl34x-i2c.c
index 416f47ddcc90..470bfd6f0830 100644
--- a/drivers/input/misc/adxl34x-i2c.c
+++ b/drivers/input/misc/adxl34x-i2c.c
@@ -105,8 +105,7 @@ static int adxl34x_i2c_remove(struct i2c_client *client)
105 return adxl34x_remove(ac); 105 return adxl34x_remove(ac);
106} 106}
107 107
108#ifdef CONFIG_PM_SLEEP 108static int __maybe_unused adxl34x_i2c_suspend(struct device *dev)
109static int adxl34x_i2c_suspend(struct device *dev)
110{ 109{
111 struct i2c_client *client = to_i2c_client(dev); 110 struct i2c_client *client = to_i2c_client(dev);
112 struct adxl34x *ac = i2c_get_clientdata(client); 111 struct adxl34x *ac = i2c_get_clientdata(client);
@@ -116,7 +115,7 @@ static int adxl34x_i2c_suspend(struct device *dev)
116 return 0; 115 return 0;
117} 116}
118 117
119static int adxl34x_i2c_resume(struct device *dev) 118static int __maybe_unused adxl34x_i2c_resume(struct device *dev)
120{ 119{
121 struct i2c_client *client = to_i2c_client(dev); 120 struct i2c_client *client = to_i2c_client(dev);
122 struct adxl34x *ac = i2c_get_clientdata(client); 121 struct adxl34x *ac = i2c_get_clientdata(client);
@@ -125,7 +124,6 @@ static int adxl34x_i2c_resume(struct device *dev)
125 124
126 return 0; 125 return 0;
127} 126}
128#endif
129 127
130static SIMPLE_DEV_PM_OPS(adxl34x_i2c_pm, adxl34x_i2c_suspend, 128static SIMPLE_DEV_PM_OPS(adxl34x_i2c_pm, adxl34x_i2c_suspend,
131 adxl34x_i2c_resume); 129 adxl34x_i2c_resume);
diff --git a/drivers/input/misc/adxl34x-spi.c b/drivers/input/misc/adxl34x-spi.c
index 76dc0679d3b1..da6e76b58dab 100644
--- a/drivers/input/misc/adxl34x-spi.c
+++ b/drivers/input/misc/adxl34x-spi.c
@@ -94,8 +94,7 @@ static int adxl34x_spi_remove(struct spi_device *spi)
94 return adxl34x_remove(ac); 94 return adxl34x_remove(ac);
95} 95}
96 96
97#ifdef CONFIG_PM_SLEEP 97static int __maybe_unused adxl34x_spi_suspend(struct device *dev)
98static int adxl34x_spi_suspend(struct device *dev)
99{ 98{
100 struct spi_device *spi = to_spi_device(dev); 99 struct spi_device *spi = to_spi_device(dev);
101 struct adxl34x *ac = spi_get_drvdata(spi); 100 struct adxl34x *ac = spi_get_drvdata(spi);
@@ -105,7 +104,7 @@ static int adxl34x_spi_suspend(struct device *dev)
105 return 0; 104 return 0;
106} 105}
107 106
108static int adxl34x_spi_resume(struct device *dev) 107static int __maybe_unused adxl34x_spi_resume(struct device *dev)
109{ 108{
110 struct spi_device *spi = to_spi_device(dev); 109 struct spi_device *spi = to_spi_device(dev);
111 struct adxl34x *ac = spi_get_drvdata(spi); 110 struct adxl34x *ac = spi_get_drvdata(spi);
@@ -114,7 +113,6 @@ static int adxl34x_spi_resume(struct device *dev)
114 113
115 return 0; 114 return 0;
116} 115}
117#endif
118 116
119static SIMPLE_DEV_PM_OPS(adxl34x_spi_pm, adxl34x_spi_suspend, 117static SIMPLE_DEV_PM_OPS(adxl34x_spi_pm, adxl34x_spi_suspend,
120 adxl34x_spi_resume); 118 adxl34x_spi_resume);
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index cab87f5ce6d3..a364e109ca7c 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -639,8 +639,7 @@ static int drv260x_probe(struct i2c_client *client,
639 return 0; 639 return 0;
640} 640}
641 641
642#ifdef CONFIG_PM_SLEEP 642static int __maybe_unused drv260x_suspend(struct device *dev)
643static int drv260x_suspend(struct device *dev)
644{ 643{
645 struct drv260x_data *haptics = dev_get_drvdata(dev); 644 struct drv260x_data *haptics = dev_get_drvdata(dev);
646 int ret = 0; 645 int ret = 0;
@@ -672,7 +671,7 @@ out:
672 return ret; 671 return ret;
673} 672}
674 673
675static int drv260x_resume(struct device *dev) 674static int __maybe_unused drv260x_resume(struct device *dev)
676{ 675{
677 struct drv260x_data *haptics = dev_get_drvdata(dev); 676 struct drv260x_data *haptics = dev_get_drvdata(dev);
678 int ret = 0; 677 int ret = 0;
@@ -702,7 +701,6 @@ out:
702 mutex_unlock(&haptics->input_dev->mutex); 701 mutex_unlock(&haptics->input_dev->mutex);
703 return ret; 702 return ret;
704} 703}
705#endif
706 704
707static SIMPLE_DEV_PM_OPS(drv260x_pm_ops, drv260x_suspend, drv260x_resume); 705static SIMPLE_DEV_PM_OPS(drv260x_pm_ops, drv260x_suspend, drv260x_resume);
708 706
diff --git a/drivers/input/misc/drv2667.c b/drivers/input/misc/drv2667.c
index 0f437581cc04..a021744e608c 100644
--- a/drivers/input/misc/drv2667.c
+++ b/drivers/input/misc/drv2667.c
@@ -406,8 +406,7 @@ static int drv2667_probe(struct i2c_client *client,
406 return 0; 406 return 0;
407} 407}
408 408
409#ifdef CONFIG_PM_SLEEP 409static int __maybe_unused drv2667_suspend(struct device *dev)
410static int drv2667_suspend(struct device *dev)
411{ 410{
412 struct drv2667_data *haptics = dev_get_drvdata(dev); 411 struct drv2667_data *haptics = dev_get_drvdata(dev);
413 int ret = 0; 412 int ret = 0;
@@ -436,7 +435,7 @@ out:
436 return ret; 435 return ret;
437} 436}
438 437
439static int drv2667_resume(struct device *dev) 438static int __maybe_unused drv2667_resume(struct device *dev)
440{ 439{
441 struct drv2667_data *haptics = dev_get_drvdata(dev); 440 struct drv2667_data *haptics = dev_get_drvdata(dev);
442 int ret = 0; 441 int ret = 0;
@@ -464,7 +463,6 @@ out:
464 mutex_unlock(&haptics->input_dev->mutex); 463 mutex_unlock(&haptics->input_dev->mutex);
465 return ret; 464 return ret;
466} 465}
467#endif
468 466
469static SIMPLE_DEV_PM_OPS(drv2667_pm_ops, drv2667_suspend, drv2667_resume); 467static SIMPLE_DEV_PM_OPS(drv2667_pm_ops, drv2667_suspend, drv2667_resume);
470 468
diff --git a/drivers/input/misc/gp2ap002a00f.c b/drivers/input/misc/gp2ap002a00f.c
index de21e317da32..0ac176d66a6f 100644
--- a/drivers/input/misc/gp2ap002a00f.c
+++ b/drivers/input/misc/gp2ap002a00f.c
@@ -225,8 +225,7 @@ static int gp2a_remove(struct i2c_client *client)
225 return 0; 225 return 0;
226} 226}
227 227
228#ifdef CONFIG_PM_SLEEP 228static int __maybe_unused gp2a_suspend(struct device *dev)
229static int gp2a_suspend(struct device *dev)
230{ 229{
231 struct i2c_client *client = to_i2c_client(dev); 230 struct i2c_client *client = to_i2c_client(dev);
232 struct gp2a_data *dt = i2c_get_clientdata(client); 231 struct gp2a_data *dt = i2c_get_clientdata(client);
@@ -244,7 +243,7 @@ static int gp2a_suspend(struct device *dev)
244 return retval; 243 return retval;
245} 244}
246 245
247static int gp2a_resume(struct device *dev) 246static int __maybe_unused gp2a_resume(struct device *dev)
248{ 247{
249 struct i2c_client *client = to_i2c_client(dev); 248 struct i2c_client *client = to_i2c_client(dev);
250 struct gp2a_data *dt = i2c_get_clientdata(client); 249 struct gp2a_data *dt = i2c_get_clientdata(client);
@@ -261,7 +260,6 @@ static int gp2a_resume(struct device *dev)
261 260
262 return retval; 261 return retval;
263} 262}
264#endif
265 263
266static SIMPLE_DEV_PM_OPS(gp2a_pm, gp2a_suspend, gp2a_resume); 264static SIMPLE_DEV_PM_OPS(gp2a_pm, gp2a_suspend, gp2a_resume);
267 265
diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c
index d708478bc5b5..6e29349da537 100644
--- a/drivers/input/misc/kxtj9.c
+++ b/drivers/input/misc/kxtj9.c
@@ -615,8 +615,7 @@ static int kxtj9_remove(struct i2c_client *client)
615 return 0; 615 return 0;
616} 616}
617 617
618#ifdef CONFIG_PM_SLEEP 618static int __maybe_unused kxtj9_suspend(struct device *dev)
619static int kxtj9_suspend(struct device *dev)
620{ 619{
621 struct i2c_client *client = to_i2c_client(dev); 620 struct i2c_client *client = to_i2c_client(dev);
622 struct kxtj9_data *tj9 = i2c_get_clientdata(client); 621 struct kxtj9_data *tj9 = i2c_get_clientdata(client);
@@ -631,7 +630,7 @@ static int kxtj9_suspend(struct device *dev)
631 return 0; 630 return 0;
632} 631}
633 632
634static int kxtj9_resume(struct device *dev) 633static int __maybe_unused kxtj9_resume(struct device *dev)
635{ 634{
636 struct i2c_client *client = to_i2c_client(dev); 635 struct i2c_client *client = to_i2c_client(dev);
637 struct kxtj9_data *tj9 = i2c_get_clientdata(client); 636 struct kxtj9_data *tj9 = i2c_get_clientdata(client);
@@ -646,7 +645,6 @@ static int kxtj9_resume(struct device *dev)
646 mutex_unlock(&input_dev->mutex); 645 mutex_unlock(&input_dev->mutex);
647 return retval; 646 return retval;
648} 647}
649#endif
650 648
651static SIMPLE_DEV_PM_OPS(kxtj9_pm_ops, kxtj9_suspend, kxtj9_resume); 649static SIMPLE_DEV_PM_OPS(kxtj9_pm_ops, kxtj9_suspend, kxtj9_resume);
652 650
diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c
index d605db4d2f39..0ee3e8b45e8b 100644
--- a/drivers/input/misc/max77693-haptic.c
+++ b/drivers/input/misc/max77693-haptic.c
@@ -310,8 +310,7 @@ static int max77693_haptic_probe(struct platform_device *pdev)
310 return 0; 310 return 0;
311} 311}
312 312
313#ifdef CONFIG_PM_SLEEP 313static int __maybe_unused max77693_haptic_suspend(struct device *dev)
314static int max77693_haptic_suspend(struct device *dev)
315{ 314{
316 struct platform_device *pdev = to_platform_device(dev); 315 struct platform_device *pdev = to_platform_device(dev);
317 struct max77693_haptic *haptic = platform_get_drvdata(pdev); 316 struct max77693_haptic *haptic = platform_get_drvdata(pdev);
@@ -324,7 +323,7 @@ static int max77693_haptic_suspend(struct device *dev)
324 return 0; 323 return 0;
325} 324}
326 325
327static int max77693_haptic_resume(struct device *dev) 326static int __maybe_unused max77693_haptic_resume(struct device *dev)
328{ 327{
329 struct platform_device *pdev = to_platform_device(dev); 328 struct platform_device *pdev = to_platform_device(dev);
330 struct max77693_haptic *haptic = platform_get_drvdata(pdev); 329 struct max77693_haptic *haptic = platform_get_drvdata(pdev);
@@ -336,7 +335,6 @@ static int max77693_haptic_resume(struct device *dev)
336 335
337 return 0; 336 return 0;
338} 337}
339#endif
340 338
341static SIMPLE_DEV_PM_OPS(max77693_haptic_pm_ops, 339static SIMPLE_DEV_PM_OPS(max77693_haptic_pm_ops,
342 max77693_haptic_suspend, max77693_haptic_resume); 340 max77693_haptic_suspend, max77693_haptic_resume);
diff --git a/drivers/input/misc/max8925_onkey.c b/drivers/input/misc/max8925_onkey.c
index 3809618e6a5d..11d0d3770239 100644
--- a/drivers/input/misc/max8925_onkey.c
+++ b/drivers/input/misc/max8925_onkey.c
@@ -133,8 +133,7 @@ static int max8925_onkey_probe(struct platform_device *pdev)
133 return 0; 133 return 0;
134} 134}
135 135
136#ifdef CONFIG_PM_SLEEP 136static int __maybe_unused max8925_onkey_suspend(struct device *dev)
137static int max8925_onkey_suspend(struct device *dev)
138{ 137{
139 struct platform_device *pdev = to_platform_device(dev); 138 struct platform_device *pdev = to_platform_device(dev);
140 struct max8925_onkey_info *info = platform_get_drvdata(pdev); 139 struct max8925_onkey_info *info = platform_get_drvdata(pdev);
@@ -148,7 +147,7 @@ static int max8925_onkey_suspend(struct device *dev)
148 return 0; 147 return 0;
149} 148}
150 149
151static int max8925_onkey_resume(struct device *dev) 150static int __maybe_unused max8925_onkey_resume(struct device *dev)
152{ 151{
153 struct platform_device *pdev = to_platform_device(dev); 152 struct platform_device *pdev = to_platform_device(dev);
154 struct max8925_onkey_info *info = platform_get_drvdata(pdev); 153 struct max8925_onkey_info *info = platform_get_drvdata(pdev);
@@ -161,7 +160,6 @@ static int max8925_onkey_resume(struct device *dev)
161 160
162 return 0; 161 return 0;
163} 162}
164#endif
165 163
166static SIMPLE_DEV_PM_OPS(max8925_onkey_pm_ops, max8925_onkey_suspend, max8925_onkey_resume); 164static SIMPLE_DEV_PM_OPS(max8925_onkey_pm_ops, max8925_onkey_suspend, max8925_onkey_resume);
167 165
diff --git a/drivers/input/misc/max8997_haptic.c b/drivers/input/misc/max8997_haptic.c
index a363ebbd9cc0..980437ac314d 100644
--- a/drivers/input/misc/max8997_haptic.c
+++ b/drivers/input/misc/max8997_haptic.c
@@ -378,8 +378,7 @@ static int max8997_haptic_remove(struct platform_device *pdev)
378 return 0; 378 return 0;
379} 379}
380 380
381#ifdef CONFIG_PM_SLEEP 381static int __maybe_unused max8997_haptic_suspend(struct device *dev)
382static int max8997_haptic_suspend(struct device *dev)
383{ 382{
384 struct platform_device *pdev = to_platform_device(dev); 383 struct platform_device *pdev = to_platform_device(dev);
385 struct max8997_haptic *chip = platform_get_drvdata(pdev); 384 struct max8997_haptic *chip = platform_get_drvdata(pdev);
@@ -388,7 +387,6 @@ static int max8997_haptic_suspend(struct device *dev)
388 387
389 return 0; 388 return 0;
390} 389}
391#endif
392 390
393static SIMPLE_DEV_PM_OPS(max8997_haptic_pm_ops, max8997_haptic_suspend, NULL); 391static SIMPLE_DEV_PM_OPS(max8997_haptic_pm_ops, max8997_haptic_suspend, NULL);
394 392
diff --git a/drivers/input/misc/palmas-pwrbutton.c b/drivers/input/misc/palmas-pwrbutton.c
index f505ac3a8d87..2c4d6ca5faab 100644
--- a/drivers/input/misc/palmas-pwrbutton.c
+++ b/drivers/input/misc/palmas-pwrbutton.c
@@ -260,7 +260,6 @@ static int palmas_pwron_remove(struct platform_device *pdev)
260 return 0; 260 return 0;
261} 261}
262 262
263#ifdef CONFIG_PM_SLEEP
264/** 263/**
265 * palmas_pwron_suspend() - suspend handler 264 * palmas_pwron_suspend() - suspend handler
266 * @dev: power button device 265 * @dev: power button device
@@ -269,7 +268,7 @@ static int palmas_pwron_remove(struct platform_device *pdev)
269 * 268 *
270 * Return: 0 269 * Return: 0
271 */ 270 */
272static int palmas_pwron_suspend(struct device *dev) 271static int __maybe_unused palmas_pwron_suspend(struct device *dev)
273{ 272{
274 struct platform_device *pdev = to_platform_device(dev); 273 struct platform_device *pdev = to_platform_device(dev);
275 struct palmas_pwron *pwron = platform_get_drvdata(pdev); 274 struct palmas_pwron *pwron = platform_get_drvdata(pdev);
@@ -290,7 +289,7 @@ static int palmas_pwron_suspend(struct device *dev)
290 * 289 *
291 * Return: 0 290 * Return: 0
292 */ 291 */
293static int palmas_pwron_resume(struct device *dev) 292static int __maybe_unused palmas_pwron_resume(struct device *dev)
294{ 293{
295 struct platform_device *pdev = to_platform_device(dev); 294 struct platform_device *pdev = to_platform_device(dev);
296 struct palmas_pwron *pwron = platform_get_drvdata(pdev); 295 struct palmas_pwron *pwron = platform_get_drvdata(pdev);
@@ -300,7 +299,6 @@ static int palmas_pwron_resume(struct device *dev)
300 299
301 return 0; 300 return 0;
302} 301}
303#endif
304 302
305static SIMPLE_DEV_PM_OPS(palmas_pwron_pm, 303static SIMPLE_DEV_PM_OPS(palmas_pwron_pm,
306 palmas_pwron_suspend, palmas_pwron_resume); 304 palmas_pwron_suspend, palmas_pwron_resume);
diff --git a/drivers/input/misc/pm8xxx-vibrator.c b/drivers/input/misc/pm8xxx-vibrator.c
index 6a915ba31bba..e5266cd9acc0 100644
--- a/drivers/input/misc/pm8xxx-vibrator.c
+++ b/drivers/input/misc/pm8xxx-vibrator.c
@@ -199,8 +199,7 @@ static int pm8xxx_vib_probe(struct platform_device *pdev)
199 return 0; 199 return 0;
200} 200}
201 201
202#ifdef CONFIG_PM_SLEEP 202static int __maybe_unused pm8xxx_vib_suspend(struct device *dev)
203static int pm8xxx_vib_suspend(struct device *dev)
204{ 203{
205 struct pm8xxx_vib *vib = dev_get_drvdata(dev); 204 struct pm8xxx_vib *vib = dev_get_drvdata(dev);
206 205
@@ -209,7 +208,6 @@ static int pm8xxx_vib_suspend(struct device *dev)
209 208
210 return 0; 209 return 0;
211} 210}
212#endif
213 211
214static SIMPLE_DEV_PM_OPS(pm8xxx_vib_pm_ops, pm8xxx_vib_suspend, NULL); 212static SIMPLE_DEV_PM_OPS(pm8xxx_vib_pm_ops, pm8xxx_vib_suspend, NULL);
215 213
diff --git a/drivers/input/misc/pmic8xxx-pwrkey.c b/drivers/input/misc/pmic8xxx-pwrkey.c
index c91e3d33aea9..28999455c752 100644
--- a/drivers/input/misc/pmic8xxx-pwrkey.c
+++ b/drivers/input/misc/pmic8xxx-pwrkey.c
@@ -53,8 +53,7 @@ static irqreturn_t pwrkey_release_irq(int irq, void *_pwr)
53 return IRQ_HANDLED; 53 return IRQ_HANDLED;
54} 54}
55 55
56#ifdef CONFIG_PM_SLEEP 56static int __maybe_unused pmic8xxx_pwrkey_suspend(struct device *dev)
57static int pmic8xxx_pwrkey_suspend(struct device *dev)
58{ 57{
59 struct pmic8xxx_pwrkey *pwrkey = dev_get_drvdata(dev); 58 struct pmic8xxx_pwrkey *pwrkey = dev_get_drvdata(dev);
60 59
@@ -64,7 +63,7 @@ static int pmic8xxx_pwrkey_suspend(struct device *dev)
64 return 0; 63 return 0;
65} 64}
66 65
67static int pmic8xxx_pwrkey_resume(struct device *dev) 66static int __maybe_unused pmic8xxx_pwrkey_resume(struct device *dev)
68{ 67{
69 struct pmic8xxx_pwrkey *pwrkey = dev_get_drvdata(dev); 68 struct pmic8xxx_pwrkey *pwrkey = dev_get_drvdata(dev);
70 69
@@ -73,7 +72,6 @@ static int pmic8xxx_pwrkey_resume(struct device *dev)
73 72
74 return 0; 73 return 0;
75} 74}
76#endif
77 75
78static SIMPLE_DEV_PM_OPS(pm8xxx_pwr_key_pm_ops, 76static SIMPLE_DEV_PM_OPS(pm8xxx_pwr_key_pm_ops,
79 pmic8xxx_pwrkey_suspend, pmic8xxx_pwrkey_resume); 77 pmic8xxx_pwrkey_suspend, pmic8xxx_pwrkey_resume);
diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c
index 8ef288e7c971..93f640a38d94 100644
--- a/drivers/input/misc/pwm-beeper.c
+++ b/drivers/input/misc/pwm-beeper.c
@@ -144,8 +144,7 @@ static int pwm_beeper_remove(struct platform_device *pdev)
144 return 0; 144 return 0;
145} 145}
146 146
147#ifdef CONFIG_PM_SLEEP 147static int __maybe_unused pwm_beeper_suspend(struct device *dev)
148static int pwm_beeper_suspend(struct device *dev)
149{ 148{
150 struct pwm_beeper *beeper = dev_get_drvdata(dev); 149 struct pwm_beeper *beeper = dev_get_drvdata(dev);
151 150
@@ -155,7 +154,7 @@ static int pwm_beeper_suspend(struct device *dev)
155 return 0; 154 return 0;
156} 155}
157 156
158static int pwm_beeper_resume(struct device *dev) 157static int __maybe_unused pwm_beeper_resume(struct device *dev)
159{ 158{
160 struct pwm_beeper *beeper = dev_get_drvdata(dev); 159 struct pwm_beeper *beeper = dev_get_drvdata(dev);
161 160
@@ -170,6 +169,7 @@ static int pwm_beeper_resume(struct device *dev)
170static SIMPLE_DEV_PM_OPS(pwm_beeper_pm_ops, 169static SIMPLE_DEV_PM_OPS(pwm_beeper_pm_ops,
171 pwm_beeper_suspend, pwm_beeper_resume); 170 pwm_beeper_suspend, pwm_beeper_resume);
172 171
172#ifdef CONFIG_PM_SLEEP
173#define PWM_BEEPER_PM_OPS (&pwm_beeper_pm_ops) 173#define PWM_BEEPER_PM_OPS (&pwm_beeper_pm_ops)
174#else 174#else
175#define PWM_BEEPER_PM_OPS NULL 175#define PWM_BEEPER_PM_OPS NULL
diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c
index fed5102e1802..151f169afb7f 100644
--- a/drivers/input/misc/sirfsoc-onkey.c
+++ b/drivers/input/misc/sirfsoc-onkey.c
@@ -179,8 +179,7 @@ static int sirfsoc_pwrc_remove(struct platform_device *pdev)
179 return 0; 179 return 0;
180} 180}
181 181
182#ifdef CONFIG_PM_SLEEP 182static int __maybe_unused sirfsoc_pwrc_resume(struct device *dev)
183static int sirfsoc_pwrc_resume(struct device *dev)
184{ 183{
185 struct sirfsoc_pwrc_drvdata *pwrcdrv = dev_get_drvdata(dev); 184 struct sirfsoc_pwrc_drvdata *pwrcdrv = dev_get_drvdata(dev);
186 struct input_dev *input = pwrcdrv->input; 185 struct input_dev *input = pwrcdrv->input;
@@ -196,7 +195,6 @@ static int sirfsoc_pwrc_resume(struct device *dev)
196 195
197 return 0; 196 return 0;
198} 197}
199#endif
200 198
201static SIMPLE_DEV_PM_OPS(sirfsoc_pwrc_pm_ops, NULL, sirfsoc_pwrc_resume); 199static SIMPLE_DEV_PM_OPS(sirfsoc_pwrc_pm_ops, NULL, sirfsoc_pwrc_resume);
202 200
diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c
index 960ef2a70910..c802c4af480c 100644
--- a/drivers/input/misc/twl4030-vibra.c
+++ b/drivers/input/misc/twl4030-vibra.c
@@ -157,8 +157,7 @@ static void twl4030_vibra_close(struct input_dev *input)
157} 157}
158 158
159/*** Module ***/ 159/*** Module ***/
160#ifdef CONFIG_PM_SLEEP 160static int __maybe_unused twl4030_vibra_suspend(struct device *dev)
161static int twl4030_vibra_suspend(struct device *dev)
162{ 161{
163 struct platform_device *pdev = to_platform_device(dev); 162 struct platform_device *pdev = to_platform_device(dev);
164 struct vibra_info *info = platform_get_drvdata(pdev); 163 struct vibra_info *info = platform_get_drvdata(pdev);
@@ -169,12 +168,11 @@ static int twl4030_vibra_suspend(struct device *dev)
169 return 0; 168 return 0;
170} 169}
171 170
172static int twl4030_vibra_resume(struct device *dev) 171static int __maybe_unused twl4030_vibra_resume(struct device *dev)
173{ 172{
174 vibra_disable_leds(); 173 vibra_disable_leds();
175 return 0; 174 return 0;
176} 175}
177#endif
178 176
179static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops, 177static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
180 twl4030_vibra_suspend, twl4030_vibra_resume); 178 twl4030_vibra_suspend, twl4030_vibra_resume);
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c
index 6d26eecc278c..190fdef06e8f 100644
--- a/drivers/input/misc/twl6040-vibra.c
+++ b/drivers/input/misc/twl6040-vibra.c
@@ -236,8 +236,7 @@ static void twl6040_vibra_close(struct input_dev *input)
236 mutex_unlock(&info->mutex); 236 mutex_unlock(&info->mutex);
237} 237}
238 238
239#ifdef CONFIG_PM_SLEEP 239static int __maybe_unused twl6040_vibra_suspend(struct device *dev)
240static int twl6040_vibra_suspend(struct device *dev)
241{ 240{
242 struct platform_device *pdev = to_platform_device(dev); 241 struct platform_device *pdev = to_platform_device(dev);
243 struct vibra_info *info = platform_get_drvdata(pdev); 242 struct vibra_info *info = platform_get_drvdata(pdev);
@@ -251,7 +250,6 @@ static int twl6040_vibra_suspend(struct device *dev)
251 250
252 return 0; 251 return 0;
253} 252}
254#endif
255 253
256static SIMPLE_DEV_PM_OPS(twl6040_vibra_pm_ops, twl6040_vibra_suspend, NULL); 254static SIMPLE_DEV_PM_OPS(twl6040_vibra_pm_ops, twl6040_vibra_suspend, NULL);
257 255