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>
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);