diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-01-28 16:26:35 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-01-31 08:15:35 -0500 |
commit | 111c6419ffeef0ef225dfdd2c8b7b03cc6bb228e (patch) | |
tree | 7fb4dc5a2af4fc00a17df031d29275ad0ce44d22 | |
parent | d316553a0cb4569a9b6260e870cab8b9c102eace (diff) |
ASoC: Move card list initialization to snd_soc_register_card
All ASoC cards need snd_soc_initialize_card_lists called. Previously, it was
only called for cards backed by a "soc-audio" platform device, via
soc_probe(). However, it's also needed for cards backed by other platform
devices, and registered directly via snd_soc_register_card().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/soc-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 9dfbb8fcb765..3feddd91b973 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1881,7 +1881,6 @@ static int soc_probe(struct platform_device *pdev) | |||
1881 | 1881 | ||
1882 | /* Bodge while we unpick instantiation */ | 1882 | /* Bodge while we unpick instantiation */ |
1883 | card->dev = &pdev->dev; | 1883 | card->dev = &pdev->dev; |
1884 | snd_soc_initialize_card_lists(card); | ||
1885 | 1884 | ||
1886 | ret = snd_soc_register_card(card); | 1885 | ret = snd_soc_register_card(card); |
1887 | if (ret != 0) { | 1886 | if (ret != 0) { |
@@ -3122,6 +3121,8 @@ int snd_soc_register_card(struct snd_soc_card *card) | |||
3122 | if (!card->name || !card->dev) | 3121 | if (!card->name || !card->dev) |
3123 | return -EINVAL; | 3122 | return -EINVAL; |
3124 | 3123 | ||
3124 | snd_soc_initialize_card_lists(card); | ||
3125 | |||
3125 | soc_init_card_debugfs(card); | 3126 | soc_init_card_debugfs(card); |
3126 | 3127 | ||
3127 | card->rtd = kzalloc(sizeof(struct snd_soc_pcm_runtime) * | 3128 | card->rtd = kzalloc(sizeof(struct snd_soc_pcm_runtime) * |