diff options
-rw-r--r-- | sound/soc/soc-core.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 7ff04ad2a97e..0a1b2f64bbee 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -834,6 +834,9 @@ EXPORT_SYMBOL_GPL(snd_soc_resume_device); | |||
834 | #define soc_resume NULL | 834 | #define soc_resume NULL |
835 | #endif | 835 | #endif |
836 | 836 | ||
837 | static struct snd_soc_dai_ops null_dai_ops = { | ||
838 | }; | ||
839 | |||
837 | static void snd_soc_instantiate_card(struct snd_soc_card *card) | 840 | static void snd_soc_instantiate_card(struct snd_soc_card *card) |
838 | { | 841 | { |
839 | struct platform_device *pdev = container_of(card->dev, | 842 | struct platform_device *pdev = container_of(card->dev, |
@@ -877,6 +880,11 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) | |||
877 | ac97 = 1; | 880 | ac97 = 1; |
878 | } | 881 | } |
879 | 882 | ||
883 | for (i = 0; i < card->num_links; i++) { | ||
884 | if (!card->dai_link[i].codec_dai->ops) | ||
885 | card->dai_link[i].codec_dai->ops = &null_dai_ops; | ||
886 | } | ||
887 | |||
880 | /* If we have AC97 in the system then don't wait for the | 888 | /* If we have AC97 in the system then don't wait for the |
881 | * codec. This will need revisiting if we have to handle | 889 | * codec. This will need revisiting if we have to handle |
882 | * systems with mixed AC97 and non-AC97 parts. Only check for | 890 | * systems with mixed AC97 and non-AC97 parts. Only check for |
@@ -2329,9 +2337,6 @@ static int snd_soc_unregister_card(struct snd_soc_card *card) | |||
2329 | return 0; | 2337 | return 0; |
2330 | } | 2338 | } |
2331 | 2339 | ||
2332 | static struct snd_soc_dai_ops null_dai_ops = { | ||
2333 | }; | ||
2334 | |||
2335 | /** | 2340 | /** |
2336 | * snd_soc_register_dai - Register a DAI with the ASoC core | 2341 | * snd_soc_register_dai - Register a DAI with the ASoC core |
2337 | * | 2342 | * |