int dthost_stop (void *host_priv) { int ret = 0; if (!host_priv) return -1; dthost_context_t *hctx = (dthost_context_t *) host_priv; ret = host_stop (hctx); if (ret < 0) goto FAIL; free (hctx); hctx = NULL; host_priv = NULL; FAIL: return ret; }
void ci_hdrc_host_destroy(struct ci_hdrc *ci) { if (ci->role == CI_ROLE_HOST && ci->hcd) host_stop(ci); }