OSDN Git Service

ASoC: wcd-mbhc: Fix list del entry issue on mbhc variable
authorLaxminath Kasam <lkasam@codeaurora.org>
Thu, 16 Mar 2017 07:31:33 +0000 (13:01 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Wed, 22 Mar 2017 07:33:07 +0000 (00:33 -0700)
Without re-init timeout completion of btn_press object
waiting in correct_plug_swch work, if mbhc_deinit and mbhc_start
happens again, it results in crash. In mbhc_deinit,
cancel correct_plug_swch work to handle this.

CRs-Fixed: 2018976
Change-Id: Ic26edea18f5a8554f4dff3bf6ad49ec039493a64
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
sound/soc/codecs/wcd-mbhc-v2.c

index e6e40d1..4b98d1e 100644 (file)
@@ -2953,6 +2953,7 @@ void wcd_mbhc_deinit(struct wcd_mbhc *mbhc)
        mbhc->mbhc_cb->free_irq(codec, mbhc->intr_ids->hph_right_ocp, mbhc);
        if (mbhc->mbhc_cb && mbhc->mbhc_cb->register_notifier)
                mbhc->mbhc_cb->register_notifier(mbhc, &mbhc->nblock, false);
+       wcd_cancel_hs_detect_plug(mbhc, &mbhc->correct_plug_swch);
        mutex_destroy(&mbhc->codec_resource_lock);
        mutex_destroy(&mbhc->hphl_pa_lock);
        mutex_destroy(&mbhc->hphr_pa_lock);