summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/da7219.c
diff options
context:
space:
mode:
authorAdam Thomson <Adam.Thomson.Opensource@diasemi.com>2018-03-13 12:07:54 +0300
committerMark Brown <broonie@kernel.org>2018-03-13 19:18:57 +0300
commit0f9d0e355d7c3fa5756313765a77961074017845 (patch)
treee75ae5be94d36f8d8f1244a0e155b43ae716ef78 /sound/soc/codecs/da7219.c
parentfc8f7ea2d6c074baaad202c9187962bfa493ef13 (diff)
downloadlinux-0f9d0e355d7c3fa5756313765a77961074017845.tar.xz
ASoC: da7219: clkdev_drop usage depends on CONFIG_COMMON_CLK
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>
Diffstat (limited to 'sound/soc/codecs/da7219.c')
-rw-r--r--sound/soc/codecs/da7219.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index 441215997273..08f55d7a11ba 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -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);