diff options
author | Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> | 2020-10-30 17:54:26 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-11-04 20:51:08 +0300 |
commit | 033df362ea3635179d1defed2230be69ed632c05 (patch) | |
tree | 6a321537f02c0403fd07f72d613be383e7e24484 /sound/soc/soc-topology.c | |
parent | ff922622443767b27232eb01bae1d9a8d42df073 (diff) | |
download | linux-033df362ea3635179d1defed2230be69ed632c05.tar.xz |
ASoC: topology: Remove empty functions
After changing memory management to resource managed one, some of the
functions became no ops, remove them as they are no longer needed.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201030145427.3497990-6-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r-- | sound/soc/soc-topology.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 6ef508f56a5f..4f632aeeeb5e 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -79,8 +79,6 @@ struct soc_tplg { static int soc_tplg_process_headers(struct soc_tplg *tplg); static void soc_tplg_complete(struct soc_tplg *tplg); -static void soc_tplg_denum_remove_texts(struct soc_enum *se); -static void soc_tplg_denum_remove_values(struct soc_enum *se); /* check we dont overflow the data for this control chunk */ static int soc_tplg_check_elem_count(struct soc_tplg *tplg, size_t elem_size, @@ -375,7 +373,6 @@ static void remove_enum(struct snd_soc_component *comp, struct snd_soc_dobj *dobj, int pass) { struct snd_card *card = comp->card->snd_card; - struct soc_enum *se = container_of(dobj, struct soc_enum, dobj); if (pass != SOC_TPLG_PASS_MIXER) return; @@ -385,9 +382,6 @@ static void remove_enum(struct snd_soc_component *comp, snd_ctl_remove(card, dobj->control.kcontrol); list_del(&dobj->list); - - soc_tplg_denum_remove_values(se); - soc_tplg_denum_remove_texts(se); } /* remove a byte kcontrol */ @@ -445,15 +439,9 @@ static void remove_widget(struct snd_soc_component *comp, /* enumerated widget mixer */ for (i = 0; w->kcontrols != NULL && i < w->num_kcontrols; i++) { struct snd_kcontrol *kcontrol = w->kcontrols[i]; - struct soc_enum *se = - (struct soc_enum *)kcontrol->private_value; snd_ctl_remove(card, kcontrol); - /* free enum kcontrol's dvalues and dtexts */ - soc_tplg_denum_remove_values(se); - soc_tplg_denum_remove_texts(se); - } } else { /* volume mixer or bytes controls */ @@ -703,11 +691,6 @@ static int soc_tplg_create_tlv(struct soc_tplg *tplg, return 0; } -static inline void soc_tplg_free_tlv(struct soc_tplg *tplg, - struct snd_kcontrol_new *kc) -{ -} - static int soc_tplg_dbytes_create(struct soc_tplg *tplg, unsigned int count, size_t size) { @@ -868,7 +851,6 @@ static int soc_tplg_dmixer_create(struct soc_tplg *tplg, unsigned int count, if (err < 0) { dev_err(tplg->dev, "ASoC: failed to init %s\n", mc->hdr.name); - soc_tplg_free_tlv(tplg, &kc); break; } @@ -878,7 +860,6 @@ static int soc_tplg_dmixer_create(struct soc_tplg *tplg, unsigned int count, if (err < 0) { dev_err(tplg->dev, "ASoC: failed to add %s\n", mc->hdr.name); - soc_tplg_free_tlv(tplg, &kc); break; } @@ -918,15 +899,9 @@ static int soc_tplg_denum_create_texts(struct soc_tplg *tplg, struct soc_enum *s return 0; err: - se->items = i; - soc_tplg_denum_remove_texts(se); return ret; } -static inline void soc_tplg_denum_remove_texts(struct soc_enum *se) -{ -} - static int soc_tplg_denum_create_values(struct soc_tplg *tplg, struct soc_enum *se, struct snd_soc_tplg_enum_control *ec) { @@ -949,10 +924,6 @@ static int soc_tplg_denum_create_values(struct soc_tplg *tplg, struct soc_enum * return 0; } -static inline void soc_tplg_denum_remove_values(struct soc_enum *se) -{ -} - static int soc_tplg_denum_create(struct soc_tplg *tplg, unsigned int count, size_t size) { @@ -1322,10 +1293,6 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_dmixer_create( return kc; err_sm: - for (; i >= 0; i--) { - soc_tplg_free_tlv(tplg, &kc[i]); - } - return NULL; } @@ -1422,17 +1389,6 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_denum_create( return kc; err_se: - for (; i >= 0; i--) { - /* free values and texts */ - se = (struct soc_enum *)kc[i].private_value; - - if (se) { - soc_tplg_denum_remove_values(se); - soc_tplg_denum_remove_texts(se); - } - - } - return NULL; } |