summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm/ttm_tt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_tt.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_tt.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 73c97dcfa512..67aa7fe39432 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -222,10 +222,7 @@ void ttm_tt_destroy(struct ttm_bo_device *bdev, struct ttm_tt *ttm)
fput(ttm->swap_storage);
ttm->swap_storage = NULL;
- if (bdev->driver->ttm_tt_destroy)
- bdev->driver->ttm_tt_destroy(bdev, ttm);
- else
- ttm->func->destroy(bdev, ttm);
+ bdev->driver->ttm_tt_destroy(bdev, ttm);
}
static void ttm_tt_init_fields(struct ttm_tt *ttm,
@@ -313,10 +310,7 @@ EXPORT_SYMBOL(ttm_dma_tt_fini);
void ttm_tt_unbind(struct ttm_bo_device *bdev, struct ttm_tt *ttm)
{
if (ttm->state == tt_bound) {
- if (bdev->driver->ttm_tt_unbind)
- bdev->driver->ttm_tt_unbind(bdev, ttm);
- else
- ttm->func->unbind(bdev, ttm);
+ bdev->driver->ttm_tt_unbind(bdev, ttm);
ttm->state = tt_unbound;
}
}
@@ -337,10 +331,7 @@ int ttm_tt_bind(struct ttm_bo_device *bdev,
if (ret)
return ret;
- if (bdev->driver->ttm_tt_bind)
- ret = bdev->driver->ttm_tt_bind(bdev, ttm, bo_mem);
- else
- ret = ttm->func->bind(bdev, ttm, bo_mem);
+ ret = bdev->driver->ttm_tt_bind(bdev, ttm, bo_mem);
if (unlikely(ret != 0))
return ret;