Exemplo n.º 1
0
INT32 wmt_plat_deinit(VOID)
{
	INT32 iret;

/* 1. de-init cmb_hw */
	iret = mtk_wcn_cmb_hw_deinit();
/* 2. unreg to cmb_stub */
	iret += mtk_wcn_cmb_stub_unreg();
/*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
	WMT_DBG_FUNC("WMT-PLAT: ALPS platform init (%d)\n", iret);

	return 0;
}
INT32 wmt_plat_deinit(VOID)
{
	INT32 iret = 0;
	/* 2. unreg to cmb_stub */
	iret = mtk_wcn_cmb_stub_unreg();

	/*3. wmt wakelock deinit */
#ifdef CFG_WMT_WAKELOCK_SUPPORT
#ifdef CONFIG_PM_WAKELOCKS
	wakeup_source_trash(&wmtWakeLock);
#else
	wake_lock_destroy(&wmtWakeLock);
#endif
	mutex_destroy(&gOsSLock);
	WMT_PLAT_DBG_FUNC("destroy wmtWakeLock\n");
#endif

	iret += mtk_wcn_consys_hw_deinit();

	WMT_PLAT_DBG_FUNC("WMT-PLAT: ALPS platform init (%d)\n", iret);

	return 0;
}