From 10444e06d4f4edaf8e8cd9370f450ce7c047efac Mon Sep 17 00:00:00 2001 From: Leif Delgass Date: Tue, 8 Apr 2003 01:30:43 +0000 Subject: Use list_entry() to get container struct from struct list_head pointers. Build fix for RedHat 9 kernel (5 args to remap_page_range()). --- linux-core/drm_vm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'linux-core/drm_vm.c') diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index 9101e136..76a10cf5 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(); -- cgit v1.2.3