aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/drm_vm.c')
-rw-r--r--drivers/char/drm/drm_vm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c
index 644ec9dadc05..675d2397def9 100644
--- a/drivers/char/drm/drm_vm.c
+++ b/drivers/char/drm/drm_vm.c
@@ -210,6 +210,8 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
210 } 210 }
211 211
212 if(!found_maps) { 212 if(!found_maps) {
213 drm_dma_handle_t dmah;
214
213 switch (map->type) { 215 switch (map->type) {
214 case _DRM_REGISTERS: 216 case _DRM_REGISTERS:
215 case _DRM_FRAME_BUFFER: 217 case _DRM_FRAME_BUFFER:
@@ -229,8 +231,10 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
229 case _DRM_SCATTER_GATHER: 231 case _DRM_SCATTER_GATHER:
230 break; 232 break;
231 case _DRM_CONSISTENT: 233 case _DRM_CONSISTENT:
232 drm_pci_free(dev, map->size, map->handle, 234 dmah.vaddr = map->handle;
233 map->offset); 235 dmah.busaddr = map->offset;
236 dmah.size = map->size;
237 __drm_pci_free(dev, &dmah);
234 break; 238 break;
235 } 239 }
236 drm_free(map, sizeof(*map), DRM_MEM_MAPS); 240 drm_free(map, sizeof(*map), DRM_MEM_MAPS);