]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
ASoC: rt286: Fix compilation warning for !PM
authorThierry Reding <treding@nvidia.com>
Thu, 2 Oct 2014 07:27:03 +0000 (09:27 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 2 Oct 2014 10:53:11 +0000 (11:53 +0100)
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt286.c

index e4f6102efc1a4855e9b2d302c36c05655abb4c70..2bb5a27c70f440e11d8fcee4d24d75cd67036185 100644 (file)
@@ -270,6 +270,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);
@@ -280,6 +281,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,