Skip to content

Commit

Permalink
ASoC: da7219: clkdev_drop usage depends on CONFIG_COMMON_CLK
Browse files Browse the repository at this point in the history
Fixes: ASoC: da7219: Add common clock usage for providing DAI clks

clkdev_drop usage in the codec remove function should be dependent
on if CONFIG_COMMON_CLK is defined for the platform, otherwise it
can cause build failures for platforms that do not support this.
The clkdev_* functions are still defined for those platforms, in
headers and source but the functions are not linked in.

This patch resolves this issue, so clkdev_drop is only used if
CONFIG_COMMON_CLK is defined.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Adam Thomson authored and broonie committed Mar 13, 2018
1 parent fc8f7ea commit 0f9d0e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/codecs/da7219.c
Original file line number Diff line number Diff line change
Expand Up @@ -1966,8 +1966,10 @@ static void da7219_remove(struct snd_soc_component *component)

da7219_aad_exit(component);

#ifdef CONFIG_COMMON_CLK
if (da7219->dai_clks_lookup)
clkdev_drop(da7219->dai_clks_lookup);
#endif

/* Supplies */
regulator_bulk_disable(DA7219_NUM_SUPPLIES, da7219->supplies);
Expand Down

0 comments on commit 0f9d0e3

Please sign in to comment.