drm_pci_free(dev, map->size, map->handle, map->offset); 
dmah.vaddr = map->handle; dmah.busaddr = map->offset; dmah.size = map->size; __drm_pci_free(dev, &dmah); 
static void drm_vm_shm_close(struct vm_area_struct *vma){	drm_file_t	*priv	= vma->vm_file->private_data;	drm_device_t	*dev	= priv->head->dev;	drm_vma_entry_t *pt, *prev, *next;	drm_map_t *map;	drm_map_list_t *r_list;	struct list_head *list;	int found_maps = 0;	DRM_DEBUG("0x%08lx,0x%08lx\n",		  vma->vm_start, vma->vm_end - vma->vm_start);	atomic_dec(&dev->vma_count);	map = vma->vm_private_data;	down(&dev->struct_sem);	for (pt = dev->vmalist, prev = NULL; pt; pt = next) {		next = pt->next;		if (pt->vma->vm_private_data == map) found_maps++;		if (pt->vma == vma) {			if (prev) {				prev->next = pt->next;			} else {				dev->vmalist = pt->next;			}			drm_free(pt, sizeof(*pt), DRM_MEM_VMAS);		} else {			prev = pt;		}	}	/* We were the only map that was found */	if(found_maps == 1 &&	   map->flags & _DRM_REMOVABLE) {		/* Check to see if we are in the maplist, if we are not, then		 * we delete this mappings information.		 */		found_maps = 0;		list = &dev->maplist->head;		list_for_each(list, &dev->maplist->head) {			r_list = list_entry(list, drm_map_list_t, head);			if (r_list->map == map) found_maps++;		}		if(!found_maps) {			switch (map->type) {			case _DRM_REGISTERS:			case _DRM_FRAME_BUFFER:				if (drm_core_has_MTRR(dev) && map->mtrr >= 0) {					int retcode;					retcode = mtrr_del(map->mtrr,							   map->offset,							   map->size);					DRM_DEBUG("mtrr_del = %d\n", retcode);				}				drm_ioremapfree(map->handle, map->size, dev);				break;			case _DRM_SHM:				vfree(map->handle);				break;			case _DRM_AGP:			case _DRM_SCATTER_GATHER:				break;			case _DRM_CONSISTENT:				drm_pci_free(dev, map->size, map->handle,					     map->offset);				break;			}			drm_free(map, sizeof(*map), DRM_MEM_MAPS);		}	}	up(&dev->struct_sem);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/9c8da5ebbf6f87293cf8555182da271449889a69/drm_vm.c/clean/drivers/char/drm/drm_vm.c