diff options
Diffstat (limited to 'drivers/char/drm/drm_drv.c')
-rw-r--r-- | drivers/char/drm/drm_drv.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c index f4046c8c70b5..ab172ea8e98a 100644 --- a/drivers/char/drm/drm_drv.c +++ b/drivers/char/drm/drm_drv.c | |||
@@ -198,6 +198,8 @@ int drm_takedown( drm_device_t *dev ) | |||
198 | r_list = (drm_map_list_t *)list; | 198 | r_list = (drm_map_list_t *)list; |
199 | 199 | ||
200 | if ( ( map = r_list->map ) ) { | 200 | if ( ( map = r_list->map ) ) { |
201 | drm_dma_handle_t dmah; | ||
202 | |||
201 | switch ( map->type ) { | 203 | switch ( map->type ) { |
202 | case _DRM_REGISTERS: | 204 | case _DRM_REGISTERS: |
203 | case _DRM_FRAME_BUFFER: | 205 | case _DRM_FRAME_BUFFER: |
@@ -229,8 +231,10 @@ int drm_takedown( drm_device_t *dev ) | |||
229 | } | 231 | } |
230 | break; | 232 | break; |
231 | case _DRM_CONSISTENT: | 233 | case _DRM_CONSISTENT: |
232 | drm_pci_free(dev, map->size, | 234 | dmah.vaddr = map->handle; |
233 | map->handle, 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); |