diff mbox

ASoC: rt286: Fix compilation warning for !PM

Message ID 1412234823-31433-1-git-send-email-thierry.reding@gmail.com (mailing list archive)
State Accepted
Commit 81f3dfe1908011ee12760ce4d75451e7446dff80
Headers show

Commit Message

Thierry Reding Oct. 2, 2014, 7:27 a.m. UTC
From: Thierry Reding <treding@nvidia.com>

The rt286_index_sync() function is only called in the resume path. If PM
is disabled it becomes unused and shouldn't be built either.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 sound/soc/codecs/rt286.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Mark Brown Oct. 2, 2014, 10:53 a.m. UTC | #1
On Thu, Oct 02, 2014 at 09:27:03AM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> The rt286_index_sync() function is only called in the resume path. If PM
> is disabled it becomes unused and shouldn't be built either.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index b86b426f159d..4aa555cbcca8 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -269,6 +269,7 @@  static int rt286_hw_read(void *context, unsigned int reg, unsigned int *value)
 	return 0;
 }
 
+#ifdef CONFIG_PM
 static void rt286_index_sync(struct snd_soc_codec *codec)
 {
 	struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec);
@@ -279,6 +280,7 @@  static void rt286_index_sync(struct snd_soc_codec *codec)
 				  rt286->index_cache[i].def);
 	}
 }
+#endif
 
 static int rt286_support_power_controls[] = {
 	RT286_DAC_OUT1,