diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2016-11-30 06:22:55 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-12-01 20:09:50 +0000 |
commit | 1a653aa44725668590b36bbe2d7fe4736a69f055 (patch) | |
tree | a4e928493b9f33906e9a9516664843e15e47ac7a /sound/soc/soc-core.c | |
parent | d9fc40639dc1b87915426d2ef489a591b0fd650b (diff) | |
download | linux-stable-1a653aa44725668590b36bbe2d7fe4736a69f055.tar.gz linux-stable-1a653aa44725668590b36bbe2d7fe4736a69f055.tar.bz2 linux-stable-1a653aa44725668590b36bbe2d7fe4736a69f055.zip |
ASoC: core: replace aux_comp_list to component_dev_list
Now, Card has component_dev_list, we can replace aux_comp_list
to component_dev_list with new auxiliary flags
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index d204bb772f00..ba8e000faaf1 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1710,7 +1710,8 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num) } component->init = aux_dev->init; - list_add(&component->list_aux, &card->aux_comp_list); + component->auxiliary = 1; + return 0; err_defer: @@ -1726,7 +1727,10 @@ static int soc_probe_aux_devices(struct snd_soc_card *card) for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST; order++) { - list_for_each_entry(comp, &card->aux_comp_list, list_aux) { + list_for_each_entry(comp, &card->component_dev_list, card_list) { + if (!comp->auxiliary) + continue; + if (comp->driver->probe_order == order) { ret = soc_probe_component(card, comp); if (ret < 0) { @@ -1750,11 +1754,14 @@ static void soc_remove_aux_devices(struct snd_soc_card *card) for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST; order++) { list_for_each_entry_safe(comp, _comp, - &card->aux_comp_list, list_aux) { + &card->component_dev_list, card_list) { + + if (!comp->auxiliary) + continue; + if (comp->driver->remove_order == order) { soc_remove_component(comp); - /* remove it from the card's aux_comp_list */ - list_del(&comp->list_aux); + comp->auxiliary = 0; } } } |