Skip to content

Commit

Permalink
ASoC: rt286: Fix compilation warning for !PM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thierry Reding authored and Mark Brown committed Oct 2, 2014
1 parent 7d1311b commit 81f3dfe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/codecs/rt286.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,
Expand Down

0 comments on commit 81f3dfe

Please sign in to comment.