Skip to contentSkip to conversation

Input: pmic8xxx-keypad: remove unnecessary CONFIG_PM_SLEEP

PATCH In review Coiby Xu 2 participants 4 messages Oct 29, 2020

Subsystems (2)
lore
Share & tools
lore

Coiby Xu

author
#0 lore raw

PATCH 1/3 Input: pmic8xxx-keypad: remove unnecessary CONFIG_PM_SLEEP

SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.

---
 drivers/input/keyboard/pmic8xxx-keypad.c | 2 --
 1 file changed, 2 deletions(-)
drivers/input/keyboard/pmic8xxx-keypad.c +0 -2
index 91d5811d6f0e..c04ab04331b2 100644
@@ -621,7 +621,6 @@ static int pmic8xxx_kp_probe(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int pmic8xxx_kp_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -661,7 +660,6 @@ static int pmic8xxx_kp_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(pm8xxx_kp_pm_ops,
 			 pmic8xxx_kp_suspend, pmic8xxx_kp_resume);
Signature · 1 line
2.28.0
author
#1 lore raw

PATCH 2/3 Input: adp5589: remove unnecessary CONFIG_PM_SLEEP

SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.

---
 drivers/input/keyboard/adp5589-keys.c | 2 --
 1 file changed, 2 deletions(-)
drivers/input/keyboard/adp5589-keys.c +0 -2
index eb0e9cd66bcb..50f94984e055 100644
@@ -1077,7 +1077,6 @@ static int adp5589_remove(struct i2c_client *client)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int adp5589_suspend(struct device *dev)
 {
 	struct adp5589_kpad *kpad = dev_get_drvdata(dev);
@@ -1109,7 +1108,6 @@ static int adp5589_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(adp5589_dev_pm_ops, adp5589_suspend, adp5589_resume);
 
Signature · 1 line
2.28.0
author
#2 lore raw

PATCH 3/3 Input: nomadik-ske-keypad: remove unnecessary CONFIG_PM_SLEEP

In reply to Coiby Xu

SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.

---
 drivers/input/keyboard/nomadik-ske-keypad.c | 2 --
 1 file changed, 2 deletions(-)
drivers/input/keyboard/nomadik-ske-keypad.c +0 -2
index 608446e14614..b3052c8fa5d2 100644
@@ -386,7 +386,6 @@ static int ske_keypad_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int ske_keypad_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -414,7 +413,6 @@ static int ske_keypad_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(ske_keypad_dev_pm_ops,
 			 ske_keypad_suspend, ske_keypad_resume);
Signature · 1 line
2.28.0
maintainer
#3 lore raw
In reply to Coiby Xu
Quoted 1 line · Coiby Xu

SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.

Doesn't it result in "defined but not used" warnings if you compile without CONFIG_PM? I believe if you are dropping #ifdef guards you need to add __maybe_unused annotations.

Quoted 28 lines
---
 drivers/input/keyboard/pmic8xxx-keypad.c | 2 --
 1 file changed, 2 deletions(-)
drivers/input/keyboard/pmic8xxx-keypad.c +0 -2
index 91d5811d6f0e..c04ab04331b2 100644
@@ -621,7 +621,6 @@ static int pmic8xxx_kp_probe(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int pmic8xxx_kp_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -661,7 +660,6 @@ static int pmic8xxx_kp_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(pm8xxx_kp_pm_ops,
 			 pmic8xxx_kp_suspend, pmic8xxx_kp_resume);
Signature · 1 line
2.28.0

Thanks.

Signature · 1 line
Dmitry