Skip to content

Commit 4aadf4b

Browse files
Tzung-Bi Shihbroonie
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/20200217105513.1.Icc323daaf71ad02f191fd8d91136b01b61eca5e3@changeid Signed-off-by: Mark Brown <[email protected]>
1 parent 8f48629 commit 4aadf4b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sound/soc/codecs/hdmi-codec.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,17 @@ static int hdmi_of_xlate_dai_id(struct snd_soc_component *component,
779779
return ret;
780780
}
781781

782+
static void hdmi_remove(struct snd_soc_component *component)
783+
{
784+
struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
785+
786+
if (hcp->hcd.ops->hook_plugged_cb)
787+
hcp->hcd.ops->hook_plugged_cb(component->dev->parent,
788+
hcp->hcd.data, NULL, NULL);
789+
}
790+
782791
static const struct snd_soc_component_driver hdmi_driver = {
792+
.remove = hdmi_remove,
783793
.dapm_widgets = hdmi_widgets,
784794
.num_dapm_widgets = ARRAY_SIZE(hdmi_widgets),
785795
.of_xlate_dai_id = hdmi_of_xlate_dai_id,

0 commit comments

Comments
 (0)