Skip to contentSkip to conversation

Input: imx_keypad - Remove ifdef

PATCH New Fabio Estevam 1 participant 1 message Jul 31, 2014

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 Input: imx_keypad - Remove ifdef

From: Fabio Estevam <[email protected]>

We can annonate the suspend/resume functions with '__maybe_unused' and get rid of the ifdef, which makes the code smaller and simpler

---
 drivers/input/keyboard/imx_keypad.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/input/keyboard/imx_keypad.c +2 -4
index 8280cb1..20a99c3 100644
@@ -531,8 +531,7 @@ static int imx_keypad_probe(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int imx_kbd_suspend(struct device *dev)
+static int __maybe_unused imx_kbd_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct imx_keypad *kbd = platform_get_drvdata(pdev);
@@ -552,7 +551,7 @@ static int imx_kbd_suspend(struct device *dev)
 	return 0;
 }
 
-static int imx_kbd_resume(struct device *dev)
+static int __maybe_unused imx_kbd_resume(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct imx_keypad *kbd = platform_get_drvdata(pdev);
@@ -575,7 +574,6 @@ err_clk:
 
 	return ret;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(imx_kbd_pm_ops, imx_kbd_suspend, imx_kbd_resume);
 
Signature · 1 line
1.9.1