diff options
Diffstat (limited to 'drivers/char/drm/drm_vm.c')
-rw-r--r-- | drivers/char/drm/drm_vm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c index ced4215e2275..39ea96e42c5b 100644 --- a/drivers/char/drm/drm_vm.c +++ b/drivers/char/drm/drm_vm.c | |||
@@ -148,7 +148,8 @@ static __inline__ struct page *drm_do_vm_shm_nopage(struct vm_area_struct *vma, | |||
148 | 148 | ||
149 | offset = address - vma->vm_start; | 149 | offset = address - vma->vm_start; |
150 | i = (unsigned long)map->handle + offset; | 150 | i = (unsigned long)map->handle + offset; |
151 | page = vmalloc_to_page((void *)i); | 151 | page = (map->type == _DRM_CONSISTENT) ? |
152 | virt_to_page((void *)i) : vmalloc_to_page((void *)i); | ||
152 | if (!page) | 153 | if (!page) |
153 | return NOPAGE_OOM; | 154 | return NOPAGE_OOM; |
154 | get_page(page); | 155 | get_page(page); |