Skip to contentSkip to conversation

ASoC: max98090: Fix build warning when CONFIG_PM_RUNTIME is not set

PATCH Applied Axel Lin 2 participants 2 messages May 2, 2013

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: max98090: Fix build warning when CONFIG_PM_RUNTIME is not set

Fix below build warning when CONFIG_PM_RUNTIME is not set.

CC [M] sound/soc/codecs/max98090.o
sound/soc/codecs/max98090.c:2339:12: warning: 'max98090_runtime_resume' defined but not used [-Wunused-function] sound/soc/codecs/max98090.c:2350:12: warning: 'max98090_runtime_suspend' defined but not used [-Wunused-function]

---
 sound/soc/codecs/max98090.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/max98090.c +2 -0
index ce0d364..4f39a50 100644
@@ -2336,6 +2336,7 @@ static int max98090_i2c_remove(struct i2c_client *client)
 	return 0;
 }
 
+#ifdef CONFIG_PM_RUNTIME
 static int max98090_runtime_resume(struct device *dev)
 {
 	struct max98090_priv *max98090 = dev_get_drvdata(dev);
@@ -2355,6 +2356,7 @@ static int max98090_runtime_suspend(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static const struct dev_pm_ops max98090_pm = {
 	SET_RUNTIME_PM_OPS(max98090_runtime_suspend,
Signature · 1 line
1.8.1.2
maintainer Applied
#1 lore raw
Quoted 5 lines · Axel Lin

Fix below build warning when CONFIG_PM_RUNTIME is not set.

CC [M] sound/soc/codecs/max98090.o
sound/soc/codecs/max98090.c:2339:12: warning: 'max98090_runtime_resume' defined but not used [-Wunused-function] sound/soc/codecs/max98090.c:2350:12: warning: 'max98090_runtime_suspend' defined but not used [-Wunused-function]

Applied, thanks.