diff options
-rw-r--r-- | include/sound/soc.h | 10 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index accb8a16c165..541ddfaa1243 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -779,6 +779,16 @@ static inline void *snd_soc_pcm_get_drvdata(struct snd_soc_pcm_runtime *rtd) | |||
779 | return dev_get_drvdata(&rtd->dev); | 779 | return dev_get_drvdata(&rtd->dev); |
780 | } | 780 | } |
781 | 781 | ||
782 | static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card) | ||
783 | { | ||
784 | INIT_LIST_HEAD(&card->dai_dev_list); | ||
785 | INIT_LIST_HEAD(&card->codec_dev_list); | ||
786 | INIT_LIST_HEAD(&card->platform_dev_list); | ||
787 | INIT_LIST_HEAD(&card->widgets); | ||
788 | INIT_LIST_HEAD(&card->paths); | ||
789 | INIT_LIST_HEAD(&card->dapm_list); | ||
790 | } | ||
791 | |||
782 | #include <sound/soc-dai.h> | 792 | #include <sound/soc-dai.h> |
783 | 793 | ||
784 | #ifdef CONFIG_DEBUG_FS | 794 | #ifdef CONFIG_DEBUG_FS |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 9c5e7cff3f01..83057127b2fa 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1872,12 +1872,7 @@ static int soc_probe(struct platform_device *pdev) | |||
1872 | 1872 | ||
1873 | /* Bodge while we unpick instantiation */ | 1873 | /* Bodge while we unpick instantiation */ |
1874 | card->dev = &pdev->dev; | 1874 | card->dev = &pdev->dev; |
1875 | INIT_LIST_HEAD(&card->dai_dev_list); | 1875 | snd_soc_initialize_card_lists(card); |
1876 | INIT_LIST_HEAD(&card->codec_dev_list); | ||
1877 | INIT_LIST_HEAD(&card->platform_dev_list); | ||
1878 | INIT_LIST_HEAD(&card->widgets); | ||
1879 | INIT_LIST_HEAD(&card->paths); | ||
1880 | INIT_LIST_HEAD(&card->dapm_list); | ||
1881 | 1876 | ||
1882 | ret = snd_soc_register_card(card); | 1877 | ret = snd_soc_register_card(card); |
1883 | if (ret != 0) { | 1878 | if (ret != 0) { |