From de706915262c23b73d31c02f267413221ca38ddf Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Mon, 19 Apr 2021 12:46:26 +0100 Subject: [PATCH] v5.7: this code was added with 5.7 - "for_each_rtd_components" The correct incantation is: git log 95cfc0a0aaf575207152dd7601e782702565a6f1 ^v5.7 --- seeed-voicecard.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/seeed-voicecard.c b/seeed-voicecard.c index fddfcf6..9f5f7e7 100644 --- a/seeed-voicecard.c +++ b/seeed-voicecard.c @@ -339,6 +339,7 @@ static int asoc_simple_init_dai(struct snd_soc_dai *dai, return 0; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0) static int asoc_simple_init_dai_link_params(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_dai_link *dai_link = rtd->dai_link; @@ -381,6 +382,7 @@ static int asoc_simple_init_dai_link_params(struct snd_soc_pcm_runtime *rtd) return 0; } +#endif static int seeed_voice_card_dai_init(struct snd_soc_pcm_runtime *rtd) { @@ -399,9 +401,11 @@ static int seeed_voice_card_dai_init(struct snd_soc_pcm_runtime *rtd) if (ret < 0) return ret; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0) ret = asoc_simple_init_dai_link_params(rtd); if (ret < 0) return ret; +#endif dev_dbg(rtd->card->dev, "codec \"%s\" mapping to cpu \"%s\"\n", codec->name, cpu->name); return 0;