diff options
author | Tzung-Bi Shih <tzungbi@google.com> | 2020-02-17 04:16:52 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-02-17 15:37:43 +0100 |
commit | 4aadf4b49ec7d80c5db842ca28479d07108c9484 (patch) | |
tree | 996aafe2e42f3916a957994c3fe060c7dd78bb0e /sound | |
parent | ASoC: dapm: remove snd_soc_dapm_put_enum_double_locked (diff) | |
download | linux-4aadf4b49ec7d80c5db842ca28479d07108c9484.tar.xz linux-4aadf4b49ec7d80c5db842ca28479d07108c9484.zip |
ASoC: hdmi-codec: set plugged_cb to NULL when component removing
Sets plugged_cb to NULL when component removing to notify its consumers
: no further plugged status report is required.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200217105513.1.Icc323daaf71ad02f191fd8d91136b01b61eca5e3@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/hdmi-codec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 543363102d03..bc2903d27e6e 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -779,7 +779,17 @@ static int hdmi_of_xlate_dai_id(struct snd_soc_component *component, return ret; } +static void hdmi_remove(struct snd_soc_component *component) +{ + struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component); + + if (hcp->hcd.ops->hook_plugged_cb) + hcp->hcd.ops->hook_plugged_cb(component->dev->parent, + hcp->hcd.data, NULL, NULL); +} + static const struct snd_soc_component_driver hdmi_driver = { + .remove = hdmi_remove, .dapm_widgets = hdmi_widgets, .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets), .of_xlate_dai_id = hdmi_of_xlate_dai_id, |