ASoC: core: Tell codec that jack is being removed

When component is being removed we should disable jack, otherwise some
codecs will try to trigger interrupt using freed structures.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Amadeusz Sławiński 2019-06-05 15:45:53 +02:00 committed by Mark Brown
parent 619c15f7fa
commit 3bb936f5b9
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 0 deletions

View File

@ -951,6 +951,7 @@ _err_defer:
static void soc_cleanup_component(struct snd_soc_component *component)
{
snd_soc_component_set_jack(component, NULL, NULL);
list_del(&component->card_list);
snd_soc_dapm_free(snd_soc_component_get_dapm(component));
soc_cleanup_component_debugfs(component);