void ttm_tt_destroy(struct ttm_tt *ttm)
{
+ int ret;
+
if (unlikely(ttm == NULL))
return;
if (ttm->state == tt_bound) {
- ttm_tt_unbind(ttm);
+ ret = ttm->func->unbind(ttm);
+ BUG_ON(ret);
+ ttm->state = tt_unbound;
}
if (ttm->state == tt_unbound)
}
EXPORT_SYMBOL(ttm_dma_tt_fini);
-void ttm_tt_unbind(struct ttm_tt *ttm)
-{
- int ret;
-
- if (ttm->state == tt_bound) {
- ret = ttm->func->unbind(ttm);
- BUG_ON(ret);
- ttm->state = tt_unbound;
- }
-}
-
int ttm_tt_bind(struct ttm_tt *ttm, struct ttm_mem_reg *bo_mem)
{
int ret = 0;