]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - sound/soc/soc-dapm.c
ASoC: dapm: Add helper function to free a widget
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 21 Jul 2015 16:11:07 +0000 (18:11 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 21 Jul 2015 17:08:53 +0000 (18:08 +0100)
commitb97e26980f6c13afad4c249b60a8dca7f5f86116
treec079016bcd47d554f55e50b8ad3dc8aef34a1090
parent62d8f23795aec9e8db2529a8ce2be638b9ab4c18
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>
include/sound/soc-dapm.h
sound/soc/soc-dapm.c
sound/soc/soc-topology.c