ASoC: soc-core: add comment to jack at soc_remove_component()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 4 Sep 2019 00:14:35 +0000 (09:14 +0900)
committerMark Brown <broonie@kernel.org>
Wed, 4 Sep 2019 12:48:58 +0000 (13:48 +0100)
Basically, driver which setups snd_soc_component_set_jack() need
to release it by themselves. But, as framework level robustness,
soc_remove_component() also releases it.

To avoid code reader confuse, this patch makes it clarify.

This patch makes it clarify.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875zm8q5n8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c

index 2a166abaade1f6b9eeb48a50f32e794e7f0666b7..05a2aff843aaf12ace444b8649a33a665d5dfd71 100644 (file)
@@ -975,7 +975,9 @@ static void soc_set_name_prefix(struct snd_soc_card *card,
 
 static void soc_cleanup_component(struct snd_soc_component *component)
 {
+       /* For framework level robustness */
        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);