INT32 stp_dbg_deinit(MTKSTP_DBG_T *stp_dbg) { STP_DBG_INFO_FUNC("stp-dbg deinit\n"); if (&(stp_dbg->logsys->lock)){ osal_unsleepable_lock_deinit(&(stp_dbg->logsys->lock)); } if (stp_dbg->logsys){ osal_vfree(stp_dbg->logsys); stp_dbg->logsys = NULL; } if (stp_dbg){ osal_kfree(stp_dbg); stp_dbg = NULL; } return 0; }
INT32 wmt_plat_deinit (VOID) { INT32 iret = 0; /* 2. unreg to cmb_stub */ iret = mtk_wcn_cmb_stub_unreg(); osal_unsleepable_lock_deinit(&gbgfIrqBle.lock); /*3. wmt wakelock deinit*/ #ifdef CFG_WMT_WAKELOCK_SUPPORT wake_lock_destroy(&wmtWakeLock); osal_sleepable_lock_deinit(&gOsSLock); WMT_DBG_FUNC("destroy wmtWakeLock\n"); #endif iret += mtk_wcn_consys_hw_deinit(); WMT_DBG_FUNC("WMT-PLAT: ALPS platform init (%d)\n", iret); return 0; }