aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2014-11-02 02:03:37 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-11-02 02:10:07 -0500
commit572081a431196f15206c6314381af4829ae3382d (patch)
treeed6f5e8b975d99b59ffde27743f46d8f4154bfe0 /drivers/input
parent97a652a852b821dd2a95b54da8c870b7b38df0e8 (diff)
Input: mouse - 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>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/mouse/cyapa.c6
-rw-r--r--drivers/input/mouse/navpoint.c6
-rw-r--r--drivers/input/mouse/synaptics_i2c.c6
3 files changed, 6 insertions, 12 deletions
diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c
index b409c3d7d4fb..1d978c7289b4 100644
--- a/drivers/input/mouse/cyapa.c
+++ b/drivers/input/mouse/cyapa.c
@@ -905,8 +905,7 @@ static int cyapa_remove(struct i2c_client *client)
905 return 0; 905 return 0;
906} 906}
907 907
908#ifdef CONFIG_PM_SLEEP 908static int __maybe_unused cyapa_suspend(struct device *dev)
909static int cyapa_suspend(struct device *dev)
910{ 909{
911 int ret; 910 int ret;
912 u8 power_mode; 911 u8 power_mode;
@@ -929,7 +928,7 @@ static int cyapa_suspend(struct device *dev)
929 return 0; 928 return 0;
930} 929}
931 930
932static int cyapa_resume(struct device *dev) 931static int __maybe_unused cyapa_resume(struct device *dev)
933{ 932{
934 int ret; 933 int ret;
935 struct cyapa *cyapa = dev_get_drvdata(dev); 934 struct cyapa *cyapa = dev_get_drvdata(dev);
@@ -944,7 +943,6 @@ static int cyapa_resume(struct device *dev)
944 enable_irq(cyapa->irq); 943 enable_irq(cyapa->irq);
945 return 0; 944 return 0;
946} 945}
947#endif /* CONFIG_PM_SLEEP */
948 946
949static SIMPLE_DEV_PM_OPS(cyapa_pm_ops, cyapa_suspend, cyapa_resume); 947static SIMPLE_DEV_PM_OPS(cyapa_pm_ops, cyapa_suspend, cyapa_resume);
950 948
diff --git a/drivers/input/mouse/navpoint.c b/drivers/input/mouse/navpoint.c
index 1ccc88af1f0b..69017279e8d7 100644
--- a/drivers/input/mouse/navpoint.c
+++ b/drivers/input/mouse/navpoint.c
@@ -318,8 +318,7 @@ static int navpoint_remove(struct platform_device *pdev)
318 return 0; 318 return 0;
319} 319}
320 320
321#ifdef CONFIG_PM_SLEEP 321static int __maybe_unused navpoint_suspend(struct device *dev)
322static int navpoint_suspend(struct device *dev)
323{ 322{
324 struct platform_device *pdev = to_platform_device(dev); 323 struct platform_device *pdev = to_platform_device(dev);
325 struct navpoint *navpoint = platform_get_drvdata(pdev); 324 struct navpoint *navpoint = platform_get_drvdata(pdev);
@@ -333,7 +332,7 @@ static int navpoint_suspend(struct device *dev)
333 return 0; 332 return 0;
334} 333}
335 334
336static int navpoint_resume(struct device *dev) 335static int __maybe_unused navpoint_resume(struct device *dev)
337{ 336{
338 struct platform_device *pdev = to_platform_device(dev); 337 struct platform_device *pdev = to_platform_device(dev);
339 struct navpoint *navpoint = platform_get_drvdata(pdev); 338 struct navpoint *navpoint = platform_get_drvdata(pdev);
@@ -346,7 +345,6 @@ static int navpoint_resume(struct device *dev)
346 345
347 return 0; 346 return 0;
348} 347}
349#endif
350 348
351static SIMPLE_DEV_PM_OPS(navpoint_pm_ops, navpoint_suspend, navpoint_resume); 349static SIMPLE_DEV_PM_OPS(navpoint_pm_ops, navpoint_suspend, navpoint_resume);
352 350
diff --git a/drivers/input/mouse/synaptics_i2c.c b/drivers/input/mouse/synaptics_i2c.c
index ad822608f6ee..878f18498f3b 100644
--- a/drivers/input/mouse/synaptics_i2c.c
+++ b/drivers/input/mouse/synaptics_i2c.c
@@ -614,8 +614,7 @@ static int synaptics_i2c_remove(struct i2c_client *client)
614 return 0; 614 return 0;
615} 615}
616 616
617#ifdef CONFIG_PM_SLEEP 617static int __maybe_unused synaptics_i2c_suspend(struct device *dev)
618static int synaptics_i2c_suspend(struct device *dev)
619{ 618{
620 struct i2c_client *client = to_i2c_client(dev); 619 struct i2c_client *client = to_i2c_client(dev);
621 struct synaptics_i2c *touch = i2c_get_clientdata(client); 620 struct synaptics_i2c *touch = i2c_get_clientdata(client);
@@ -628,7 +627,7 @@ static int synaptics_i2c_suspend(struct device *dev)
628 return 0; 627 return 0;
629} 628}
630 629
631static int synaptics_i2c_resume(struct device *dev) 630static int __maybe_unused synaptics_i2c_resume(struct device *dev)
632{ 631{
633 int ret; 632 int ret;
634 struct i2c_client *client = to_i2c_client(dev); 633 struct i2c_client *client = to_i2c_client(dev);
@@ -643,7 +642,6 @@ static int synaptics_i2c_resume(struct device *dev)
643 642
644 return 0; 643 return 0;
645} 644}
646#endif
647 645
648static SIMPLE_DEV_PM_OPS(synaptics_i2c_pm, synaptics_i2c_suspend, 646static SIMPLE_DEV_PM_OPS(synaptics_i2c_pm, synaptics_i2c_suspend,
649 synaptics_i2c_resume); 647 synaptics_i2c_resume);