From 8991080a99ec5a166e11068fddbc8420079f6000 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Tue, 13 Jan 2015 13:20:59 +0200 Subject: gpu: nvgpu: use gk20a_free_inst_block in remove_vm Use the common instance block freeing function when removing vm. Change-Id: I1dfaaceb57e01d0a1359ce5742ed55d81dff10ed Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/672033 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 6b7f84a3..cfd44cc3 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -268,16 +268,10 @@ static int gk20a_init_mm_reset_enable_hw(struct gk20a *g) static void gk20a_remove_vm(struct vm_gk20a *vm, struct inst_desc *inst_block) { struct gk20a *g = vm->mm->g; - struct device *d = dev_from_gk20a(g); gk20a_dbg_fn(""); - if (inst_block->cpuva) - dma_free_coherent(d, inst_block->size, - inst_block->cpuva, inst_block->iova); - inst_block->cpuva = NULL; - inst_block->iova = 0; - + gk20a_free_inst_block(g, inst_block); gk20a_vm_remove_support_nofree(vm); } -- cgit v1.2.2