summaryrefslogtreecommitdiff
path: root/drivers/char/drm/drm_vm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-08-07 20:07:43 +1000
committerDave Airlie <airlied@linux.ie>2006-09-22 05:32:30 +1000
commit3d77461ecd7fb92bb888f69478e3518b3c947ce3 (patch)
tree8f5c01d7d50873e9361aa50a070f633bb77f838c /drivers/char/drm/drm_vm.c
parente478bec0ba0a83a48a0f6982934b6de079e7e6b3 (diff)
drm: cleanup old compat code and DRM fns from Linux only code
This patch removes some of the old compatibility macros from the DRM, and removes use of DRM wrappers from Linux specific code. 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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c
index ffd0800ed601..afb4f0a44b81 100644
--- a/drivers/char/drm/drm_vm.c
+++ b/drivers/char/drm/drm_vm.c
@@ -75,7 +75,7 @@ static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
map = r_list->map;
if (!map)
continue;
- if (r_list->user_token == VM_OFFSET(vma))
+ if (r_list->user_token == (vma->vm_pgoff << PAGE_SHIFT))
break;
}
@@ -467,7 +467,7 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
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));
+ vma->vm_start, vma->vm_end, vma->vm_pgoff << PAGE_SHIFT);
/* Length must match exact page count */
if (!dma || (length >> PAGE_SHIFT) != dma->page_count) {
@@ -526,7 +526,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
struct list_head *list;
DRM_DEBUG("start = 0x%lx, end = 0x%lx, offset = 0x%lx\n",
- vma->vm_start, vma->vm_end, VM_OFFSET(vma));
+ vma->vm_start, vma->vm_end, vma->vm_pgoff << PAGE_SHIFT);
if (!priv->authenticated)
return -EACCES;
@@ -535,7 +535,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
* the AGP mapped at physical address 0
* --BenH.
*/
- if (!VM_OFFSET(vma)
+ if (!(vma->vm_pgoff << PAGE_SHIFT)
#if __OS_HAS_AGP
&& (!dev->agp
|| dev->agp->agp_info.device->vendor != PCI_VENDOR_ID_APPLE)
@@ -556,7 +556,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
map = r_list->map;
if (!map)
continue;
- if (r_list->user_token == VM_OFFSET(vma))
+ if (r_list->user_token == vma->vm_pgoff << PAGE_SHIFT)
break;
}
@@ -620,7 +620,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
offset = dev->driver->get_reg_ofs(dev);
#ifdef __sparc__
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
- if (io_remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start,
+ if (io_remap_pfn_range(vma, vma->vm_start,
(map->offset + offset) >> PAGE_SHIFT,
vma->vm_end - vma->vm_start,
vma->vm_page_prot))