aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2017-03-23 20:13:00 -0400
committerMark Brown <broonie@kernel.org>2017-03-24 14:41:26 -0400
commit991454e17070eaf5286a666d9e896fd6fb332c72 (patch)
treeb94bec9107b1222bc5ca4e690127717b15823ba5
parentec5a82d6c0b860bf4cba5c7ef8646ae5dad9f5a6 (diff)
ASoC: core: remove pointless auxiliary from snd_soc_component
commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") tried to replace aux_comp_list to component_dev_list, but it failed because of binding timing. Thus, Sylwester fixuped it by commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary..."). One of main purpose of commit 1a653aa44725 ("ASoC: core: replace...") was remove replaceable list (= list_aux) from snd_soc_component by using new "auxiliary" flags (but it failed). Because of this background, current code has reborned card_aux_list (= same as original list_aux), and almost pointless "auxiliary" flags. Let's remove pointless "auxiliary" flags by this patch This means, it is same as revert both commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") and commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary..."). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--include/sound/soc.h1
-rw-r--r--sound/soc/soc-core.c15
2 files changed, 5 insertions, 11 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index cdfb55f7aede..ee838b0d5db8 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -812,7 +812,6 @@ struct snd_soc_component {
812 812
813 unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ 813 unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
814 unsigned int registered_as_component:1; 814 unsigned int registered_as_component:1;
815 unsigned int auxiliary:1; /* for auxiliary component of the card */
816 unsigned int suspended:1; /* is in suspend PM state */ 815 unsigned int suspended:1; /* is in suspend PM state */
817 816
818 struct list_head list; 817 struct list_head list;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d29fbc7195a0..a6f840beacb0 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1776,7 +1776,6 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
1776 } 1776 }
1777 1777
1778 component->init = aux_dev->init; 1778 component->init = aux_dev->init;
1779 component->auxiliary = 1;
1780 list_add(&component->card_aux_list, &card->aux_comp_list); 1779 list_add(&component->card_aux_list, &card->aux_comp_list);
1781 1780
1782 return 0; 1781 return 0;
@@ -1788,14 +1787,13 @@ err_defer:
1788 1787
1789static int soc_probe_aux_devices(struct snd_soc_card *card) 1788static int soc_probe_aux_devices(struct snd_soc_card *card)
1790{ 1789{
1791 struct snd_soc_component *comp, *tmp; 1790 struct snd_soc_component *comp;
1792 int order; 1791 int order;
1793 int ret; 1792 int ret;
1794 1793
1795 for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST; 1794 for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
1796 order++) { 1795 order++) {
1797 list_for_each_entry_safe(comp, tmp, &card->aux_comp_list, 1796 list_for_each_entry(comp, &card->aux_comp_list, card_aux_list) {
1798 card_aux_list) {
1799 if (comp->driver->probe_order == order) { 1797 if (comp->driver->probe_order == order) {
1800 ret = soc_probe_component(card, comp); 1798 ret = soc_probe_component(card, comp);
1801 if (ret < 0) { 1799 if (ret < 0) {
@@ -1804,7 +1802,6 @@ static int soc_probe_aux_devices(struct snd_soc_card *card)
1804 comp->name, ret); 1802 comp->name, ret);
1805 return ret; 1803 return ret;
1806 } 1804 }
1807 list_del(&comp->card_aux_list);
1808 } 1805 }
1809 } 1806 }
1810 } 1807 }
@@ -1820,14 +1817,12 @@ static void soc_remove_aux_devices(struct snd_soc_card *card)
1820 for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST; 1817 for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
1821 order++) { 1818 order++) {
1822 list_for_each_entry_safe(comp, _comp, 1819 list_for_each_entry_safe(comp, _comp,
1823 &card->component_dev_list, card_list) { 1820 &card->aux_comp_list, card_aux_list) {
1824
1825 if (!comp->auxiliary)
1826 continue;
1827 1821
1828 if (comp->driver->remove_order == order) { 1822 if (comp->driver->remove_order == order) {
1829 soc_remove_component(comp); 1823 soc_remove_component(comp);
1830 comp->auxiliary = 0; 1824 /* remove it from the card's aux_comp_list */
1825 list_del(&comp->card_aux_list);
1831 } 1826 }
1832 } 1827 }
1833 } 1828 }