aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_vm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2005-08-07 01:19:58 -0400
committerDave Airlie <airlied@linux.ie>2005-08-07 01:19:58 -0400
commitd27c9b548ad79c14830c57355dbe3a35f970532a (patch)
treee274cd6193597b3860cbf9768241528067905912 /drivers/char/drm/drm_vm.c
parentaa0ca6b4bb818406d4769edb9ff115500c8e4090 (diff)
drm: remove version.h and any version checks..
This patch removes all the drm kernel conditionals from the kernel DRM tree. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_vm.c')
-rw-r--r--drivers/char/drm/drm_vm.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c
index 99b5c86f7513..292fa7167b26 100644
--- a/drivers/char/drm/drm_vm.c
+++ b/drivers/char/drm/drm_vm.c
@@ -314,8 +314,6 @@ static __inline__ struct page *drm_do_vm_sg_nopage(struct vm_area_struct *vma,
314} 314}
315 315
316 316
317#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
318
319static struct page *drm_vm_nopage(struct vm_area_struct *vma, 317static struct page *drm_vm_nopage(struct vm_area_struct *vma,
320 unsigned long address, 318 unsigned long address,
321 int *type) { 319 int *type) {
@@ -344,35 +342,6 @@ static struct page *drm_vm_sg_nopage(struct vm_area_struct *vma,
344 return drm_do_vm_sg_nopage(vma, address); 342 return drm_do_vm_sg_nopage(vma, address);
345} 343}
346 344
347#else /* LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,0) */
348
349static struct page *drm_vm_nopage(struct vm_area_struct *vma,
350 unsigned long address,
351 int unused) {
352 return drm_do_vm_nopage(vma, address);
353}
354
355static struct page *drm_vm_shm_nopage(struct vm_area_struct *vma,
356 unsigned long address,
357 int unused) {
358 return drm_do_vm_shm_nopage(vma, address);
359}
360
361static struct page *drm_vm_dma_nopage(struct vm_area_struct *vma,
362 unsigned long address,
363 int unused) {
364 return drm_do_vm_dma_nopage(vma, address);
365}
366
367static struct page *drm_vm_sg_nopage(struct vm_area_struct *vma,
368 unsigned long address,
369 int unused) {
370 return drm_do_vm_sg_nopage(vma, address);
371}
372
373#endif
374
375
376/** AGP virtual memory operations */ 345/** AGP virtual memory operations */
377static struct vm_operations_struct drm_vm_ops = { 346static struct vm_operations_struct drm_vm_ops = {
378 .nopage = drm_vm_nopage, 347 .nopage = drm_vm_nopage,
@@ -496,11 +465,7 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
496 465
497 vma->vm_ops = &drm_vm_dma_ops; 466 vma->vm_ops = &drm_vm_dma_ops;
498 467
499#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */
500 vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
501#else
502 vma->vm_flags |= VM_RESERVED; /* Don't swap */ 468 vma->vm_flags |= VM_RESERVED; /* Don't swap */
503#endif
504 469
505 vma->vm_file = filp; /* Needed for drm_vm_open() */ 470 vma->vm_file = filp; /* Needed for drm_vm_open() */
506 drm_vm_open(vma); 471 drm_vm_open(vma);
@@ -660,29 +625,17 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
660 vma->vm_private_data = (void *)map; 625 vma->vm_private_data = (void *)map;
661 /* Don't let this area swap. Change when 626 /* Don't let this area swap. Change when
662 DRM_KERNEL advisory is supported. */ 627 DRM_KERNEL advisory is supported. */
663#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */
664 vma->vm_flags |= VM_LOCKED;
665#else
666 vma->vm_flags |= VM_RESERVED; 628 vma->vm_flags |= VM_RESERVED;
667#endif
668 break; 629 break;
669 case _DRM_SCATTER_GATHER: 630 case _DRM_SCATTER_GATHER:
670 vma->vm_ops = &drm_vm_sg_ops; 631 vma->vm_ops = &drm_vm_sg_ops;
671 vma->vm_private_data = (void *)map; 632 vma->vm_private_data = (void *)map;
672#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */
673 vma->vm_flags |= VM_LOCKED;
674#else
675 vma->vm_flags |= VM_RESERVED; 633 vma->vm_flags |= VM_RESERVED;
676#endif
677 break; 634 break;
678 default: 635 default:
679 return -EINVAL; /* This should never happen. */ 636 return -EINVAL; /* This should never happen. */
680 } 637 }
681#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */
682 vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
683#else
684 vma->vm_flags |= VM_RESERVED; /* Don't swap */ 638 vma->vm_flags |= VM_RESERVED; /* Don't swap */
685#endif
686 639
687 vma->vm_file = filp; /* Needed for drm_vm_open() */ 640 vma->vm_file = filp; /* Needed for drm_vm_open() */
688 drm_vm_open(vma); 641 drm_vm_open(vma);