summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-07-21 12:11:07 -0400
committerMark Brown <broonie@kernel.org>2015-07-21 13:08:53 -0400
commitb97e26980f6c13afad4c249b60a8dca7f5f86116 (patch)
treec079016bcd47d554f55e50b8ad3dc8aef34a1090 /include/sound
parent62d8f23795aec9e8db2529a8ce2be638b9ab4c18 (diff)
ASoC: dapm: Add helper function to free a widget
snd_soc_tplg_widget_remove_all() has a verbatim copy of an older version of the widget freeing code from dapm_free_widgets(). Add a new helper function that takes care of freeing a widget and use it in both places. This removes the duplicated code and also makes sure that future changes to the widget freeing code only have to be made in one location. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dapm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 37d95a898275..cadc7fc5d727 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -397,6 +397,7 @@ int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm,
397 const struct snd_soc_dapm_route *route, int num); 397 const struct snd_soc_dapm_route *route, int num);
398int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm, 398int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm,
399 const struct snd_soc_dapm_route *route, int num); 399 const struct snd_soc_dapm_route *route, int num);
400void snd_soc_dapm_free_widget(struct snd_soc_dapm_widget *w);
400 401
401/* dapm events */ 402/* dapm events */
402void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream, 403void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream,