Messages in this thread Patch in this message | | | Date | Wed, 03 Nov 1999 01:56:36 -0600 | From | Ian Baird <> | Subject | PATCH] fbmem.c, kernel 2.3.25 |
| |
I noticed that a few lines that referenced the vm_offset member of the vm_area_struct structure in fbmem.c were giving me errors when i attempted to compile kernel 2.3.25. Here is my bugfix patch (which works on my machine with ver limited testing) that turns all references to the vm_offset member of the aforementioned structure in the code to the vm_pgoff member of the structure.
Ian Baird <ibaird@umr.edu>
--- linux-2.3.25/drivers/video/fbmem.c Thu Oct 28 16:34:46 1999 +++ linux/drivers/video/fbmem.c Tue Nov 2 20:16:22 1999 @@ -505,9 +505,9 @@ len = (start & ~PAGE_MASK)+fix.smem_len; start &= PAGE_MASK; len = (len+~PAGE_MASK) & PAGE_MASK; - if (vma->vm_offset >= len) { + if (vma->vm_pgoff >= len) { /* memory mapped io */ - vma->vm_offset -= len; + vma->vm_pgoff -= len; fb->fb_get_var(&var, PROC_CONSOLE(info), info); if (var.accel_flags) return -EINVAL; @@ -516,10 +516,10 @@ start &= PAGE_MASK; len = (len+~PAGE_MASK) & PAGE_MASK; } - if ((vma->vm_end - vma->vm_start + vma->vm_offset) > len) + if ((vma->vm_end - vma->vm_start + vma->vm_pgoff) > len) return -EINVAL; - vma->vm_offset += start; - if (vma->vm_offset & ~PAGE_MASK) + vma->vm_pgoff += start; + if (vma->vm_pgoff & ~PAGE_MASK) return -ENXIO; #if defined(__mc68000__) if (CPU_IS_020_OR_030) @@ -549,7 +549,7 @@ #else #warning What do we have to do here?? #endif - if (io_remap_page_range(vma->vm_start, vma->vm_offset, + if (io_remap_page_range(vma->vm_start, vma->vm_pgoff, vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; return 0; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |