FreeBSD/sys/dev/drm/drm_bufs.c
/* Remove a map private from list and deallocate resources if the mapping
 * isn't in use.
 */
Remove a map private from list and deallocate resources if the mapping
isn't in use.
Remove a map private from list and deallocate resources if the mapping isn ' t in use .
int drm_rmmap_ioctl(struct drm_device *dev, void *data,
		    struct drm_file *file_priv)
{
	drm_local_map_t *map;
	struct drm_map *request = data;
	DRM_LOCK();
	TAILQ_FOREACH(map, &dev->maplist, link) {
		if (map->handle == request->handle &&
		    map->flags & _DRM_REMOVABLE)
			break;
	}
	if (map == NULL) {
		DRM_UNLOCK();
		return EINVAL;
	}
	drm_rmmap(dev, map);
	DRM_UNLOCK();
	return 0;
}
int drm_rmmap_ioctl ( struct drm_device * dev , void * data , struct drm_file * file_priv ) { drm_local_map_t * map ; struct drm_map * request = data ; DRM_LOCK ( ) ; TAILQ_FOREACH ( map , & dev -> maplist , link ) { if ( map -> handle == request -> handle && map -> flags & _DRM_REMOVABLE ) break ; } if ( map == NULL ) { DRM_UNLOCK ( ) ; return EINVAL ; } drm_rmmap ( dev , map ) ; DRM_UNLOCK ( ) ; return 0 ; }
Remove a map private from list and deallocate resources if the mapping
 isn't in use.
Remove a map private from list and deallocate resources if the mapping isn ' t in use .
/* No match found. */