diff options
Diffstat (limited to 'linux-core/drm_vm.c')
-rw-r--r-- | linux-core/drm_vm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index 9101e1365..76a10cf54 100644 --- a/linux-core/drm_vm.c +++ b/linux-core/drm_vm.c @@ -74,7 +74,7 @@ struct page *DRM(vm_nopage)(struct vm_area_struct *vma, if(!dev->agp || !dev->agp->cant_use_aperture) goto vm_nopage_error; list_for_each(list, &dev->maplist->head) { - r_list = (drm_map_list_t *)list; + r_list = list_entry(list, drm_map_list_t, head); map = r_list->map; if (!map) continue; if (map->offset == VM_OFFSET(vma)) break; @@ -190,7 +190,7 @@ void DRM(vm_shm_close)(struct vm_area_struct *vma) found_maps = 0; list = &dev->maplist->head; list_for_each(list, &dev->maplist->head) { - r_list = (drm_map_list_t *) list; + r_list = list_entry(list, drm_map_list_t, head); if (r_list->map == map) found_maps++; } @@ -393,7 +393,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma) list_for_each(list, &dev->maplist->head) { unsigned long off; - r_list = (drm_map_list_t *)list; + r_list = list_entry(list, drm_map_list_t, head); map = r_list->map; if (!map) continue; off = DRIVER_GET_MAP_OFS(); |