aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_conexant.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-06-19 12:45:53 +0200
committerTakashi Iwai <tiwai@suse.de>2018-06-21 13:54:37 +0200
commit0bed2aa3ac5cbbd0b89bf5e94f165e2ef18180ad (patch)
treec68cbf326fce4477f7a0b74860879e1c91c67126 /sound/pci/hda/patch_conexant.c
parentALSA: hda/sigmatel - Use common helper for mic mute LED (diff)
downloadlinux-dev-0bed2aa3ac5cbbd0b89bf5e94f165e2ef18180ad.tar.xz
linux-dev-0bed2aa3ac5cbbd0b89bf5e94f165e2ef18180ad.zip
ALSA: hda - Sanity check of unexpected cap_sync_hook override
There are a couple of places setting cap_sync_hook in the codec drivers, and they just overwrite the value. Add a sanity check via WARN_ON() in case if an old non-NULL value is overridden and forgotten. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r--sound/pci/hda/patch_conexant.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index a9fd0572d526..b7339cb5c45b 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -343,6 +343,7 @@ static void cxt_fixup_headphone_mic(struct hda_codec *codec,
snd_hdac_regmap_add_vendor_verb(&codec->core, 0x410);
break;
case HDA_FIXUP_ACT_PROBE:
+ WARN_ON(spec->gen.cap_sync_hook);
spec->gen.cap_sync_hook = cxt_update_headset_mode_hook;
spec->gen.automute_hook = cxt_update_headset_mode;
break;