Skip to contentSkip to conversation

Input: adp5589-keys - mark suspend and resume methods as __maybe_unused

PATCH In review Dmitry Torokhov 2 participants 2 messages Nov 19, 2020

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: adp5589-keys - mark suspend and resume methods as __maybe_unused

This improves compile coverage of the code; unused code will be dropped by the linker.

---
 drivers/input/keyboard/adp5589-keys.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/input/keyboard/adp5589-keys.c +2 -4
index 31145a85c819..a9b69a268c09 100644
@@ -1016,8 +1016,7 @@ static int adp5589_probe(struct i2c_client *client,
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int adp5589_suspend(struct device *dev)
+static int __maybe_unused adp5589_suspend(struct device *dev)
 {
 	struct adp5589_kpad *kpad = dev_get_drvdata(dev);
 	struct i2c_client *client = kpad->client;
@@ -1033,7 +1032,7 @@ static int adp5589_suspend(struct device *dev)
 	return 0;
 }
 
-static int adp5589_resume(struct device *dev)
+static int __maybe_unused adp5589_resume(struct device *dev)
 {
 	struct adp5589_kpad *kpad = dev_get_drvdata(dev);
 	struct i2c_client *client = kpad->client;
@@ -1048,7 +1047,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 · 5 lines
2.29.2.299.gdc1121823c-goog


-- 
Dmitry
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: Dmitry Torokhov <[email protected]>
Sent: Thursday, November 19, 2020 9:24 AM
To: [email protected]
Cc: Ardelean, Alexandru <[email protected]>; linux- [email protected]
Subject: [PATCH] Input: adp5589-keys - mark suspend and resume methods as __maybe_unused

Quoted 5 lines

[External]

This improves compile coverage of the code; unused code will be dropped by the linker.

Quoted 44 lines
---
 drivers/input/keyboard/adp5589-keys.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/input/keyboard/adp5589-keys.c +1 -2
index 31145a85c819..a9b69a268c09 100644
@@ -1016,8 +1016,7 @@ static int adp5589_probe(struct i2c_client *client,
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int adp5589_suspend(struct device *dev)
+static int __maybe_unused adp5589_suspend(struct device *dev)
 {
 	struct adp5589_kpad *kpad = dev_get_drvdata(dev);
 	struct i2c_client *client = kpad->client; @@ -1033,7 +1032,7 @@ static

int adp5589_suspend(struct device *dev)

drivers/input/keyboard/adp5589-keys.c +1 -1
 	return 0;
 }
 
-static int adp5589_resume(struct device *dev)
+static int __maybe_unused adp5589_resume(struct device *dev)
 {
 	struct adp5589_kpad *kpad = dev_get_drvdata(dev);
 	struct i2c_client *client = kpad->client; @@ -1048,7 +1047,6 @@ static

int adp5589_resume(struct device *dev)

drivers/input/keyboard/adp5589-keys.c +0 -1
 	return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(adp5589_dev_pm_ops, adp5589_suspend,

adp5589_resume);

--
2.29.2.299.gdc1121823c-goog

--
Dmitry