#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */ vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */ #else 
static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma){	drm_file_t	 *priv	 = filp->private_data;	drm_device_t	 *dev;	drm_device_dma_t *dma;	unsigned long	 length	 = vma->vm_end - vma->vm_start;	lock_kernel();	dev	 = priv->head->dev;	dma	 = dev->dma;	DRM_DEBUG("start = 0x%lx, end = 0x%lx, offset = 0x%lx\n",		  vma->vm_start, vma->vm_end, VM_OFFSET(vma));				/* Length must match exact page count */	if (!dma || (length >> PAGE_SHIFT) != dma->page_count) {		unlock_kernel();		return -EINVAL;	}	unlock_kernel();	vma->vm_ops   = &drm_vm_dma_ops;#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */	vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */#else	vma->vm_flags |= VM_RESERVED; /* Don't swap */#endif	vma->vm_file  =	 filp;	/* Needed for drm_vm_open() */	drm_vm_open(vma);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d27c9b548ad79c14830c57355dbe3a35f970532a/drm_vm.c/clean/drivers/char/drm/drm_vm.c