Skip to contentSkip to conversation

mfd: sec: Only build suspend() and resume if they will be used

PATCH New Mark Brown 1 participant 1 message Jan 26, 2014

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mfd: sec: Only build suspend() and resume if they will be used

From: Mark Brown <[email protected]>

Not doing so causes warnings as the functions are static but end up not being referenced, the macros aren't smart enough to generate fake references.

---
 drivers/mfd/sec-core.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mfd/sec-core.c +2 -0
index a139798b8065..456ce491b733 100644
@@ -315,6 +315,7 @@ static int sec_pmic_remove(struct i2c_client *i2c)
 	return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int sec_pmic_suspend(struct device *dev)
 {
 	struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
@@ -349,6 +350,7 @@ static int sec_pmic_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(sec_pmic_pm_ops, sec_pmic_suspend, sec_pmic_resume);
 
Signature · 1 line
1.8.5.3