fm_s32 fm_link_release(void) { fm_flag_event_put(link_event->ln_event); if (link_event) { fm_free(link_event); } WCN_DBG(FM_NTC | LINK, "fm link release\n"); i2c_del_driver(&MT6626_driver); return 0; }
fm_s32 fm_link_release(void) { fm_trace_fifo_release(evt_fifo); fm_trace_fifo_release(cmd_fifo); fm_flag_event_put(link_event->ln_event); if (link_event) { fm_free(link_event); } WCN_DBG(FM_NTC | LINK, "fm link release\n"); return 0; }
fm_s32 fm_link_setup(void *data) { fm_s32 ret = 0; if (!(link_event = fm_zalloc(sizeof(struct fm_link_event)))) { WCN_DBG(FM_ALT | LINK, "fm_zalloc(fm_link_event) -ENOMEM\n"); return -1; } link_event->ln_event = fm_flag_event_create("ln_evt"); if (!link_event->ln_event) { WCN_DBG(FM_ALT | LINK, "create mt6620_ln_event failed\n"); fm_free(link_event); return -1; } fm_flag_event_get(link_event->ln_event); WCN_DBG(FM_NTC | LINK, "fm link setup\n"); cmd_fifo = fm_trace_fifo_create("cmd_fifo"); if (!cmd_fifo) { WCN_DBG(FM_ALT | LINK, "create cmd_fifo failed\n"); ret = -1; goto failed; } evt_fifo = fm_trace_fifo_create("evt_fifo"); if (!evt_fifo) { WCN_DBG(FM_ALT | LINK, "create evt_fifo failed\n"); ret = -1; goto failed; } reset = data; /* get whole chip reset cb */ mtk_wcn_wmt_msgcb_reg(WMTDRV_TYPE_FM, WCNfm_wholechip_rst_cb); return 0; failed: fm_trace_fifo_release(evt_fifo); fm_trace_fifo_release(cmd_fifo); fm_flag_event_put(link_event->ln_event); if (link_event) { fm_free(link_event); } return ret; }