diff options
author | Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> | 2019-06-17 13:36:40 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-25 15:33:16 +0100 |
commit | e79986ce50d65f490c6eab3aaea1ff2ab5df5d04 (patch) | |
tree | 8eed10ca705635c6427400048e4a09abab3178f4 /sound/soc/intel/skylake/skl-pcm.c | |
parent | 5b8e4c1c66021dab1ed1683704f7ce47adbd7934 (diff) | |
download | linux-e79986ce50d65f490c6eab3aaea1ff2ab5df5d04.tar.gz linux-e79986ce50d65f490c6eab3aaea1ff2ab5df5d04.tar.bz2 linux-e79986ce50d65f490c6eab3aaea1ff2ab5df5d04.zip |
ASoC: Intel: Skylake: Properly cleanup on component removal
When we remove component we need to reverse things which were done on
init, this consists of topology cleanup, lists cleanup and releasing
firmware.
Currently cleanup handlers are put in wrong places or otherwise missing.
So add proper component cleanup function and perform cleanups in it.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/skylake/skl-pcm.c')
-rw-r--r-- | sound/soc/intel/skylake/skl-pcm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index c03327ed94a0..75100b44b49a 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -1471,8 +1471,12 @@ static int skl_platform_soc_probe(struct snd_soc_component *component) static void skl_pcm_remove(struct snd_soc_component *component) { - /* remove topology */ - snd_soc_tplg_component_remove(component, SND_SOC_TPLG_INDEX_ALL); + struct hdac_bus *bus = dev_get_drvdata(component->dev); + struct skl *skl = bus_to_skl(bus); + + skl_tplg_exit(component, bus); + + skl_debugfs_exit(skl); } static const struct snd_soc_component_driver skl_component = { |