fix for new 2.5 remap_page_range() prototype
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 12 Jun 2003 16:10:54 +0000 (16:10 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 12 Jun 2003 16:10:54 +0000 (16:10 +0000)
comedi/comedi_fops.c
include/linux/mm.h

index 68265e79814076d8c1489e6b7046e3c3730d0485..e04a25bb29086d9d0e1224c7f4967e9700199b73 100644 (file)
@@ -1292,7 +1292,7 @@ static int comedi_mmap_v22(struct file * file, struct vm_area_struct *vma)
 
        n_pages = size >> PAGE_SHIFT;
        for(i=0;i<n_pages;i++){
-               if(remap_page_range(start, __pa(async->buf_page_list[i]),
+               if(REMAP_PAGE_RANGE(vma, start, __pa(async->buf_page_list[i]),
                                PAGE_SIZE, PAGE_SHARED)){
                        return -EAGAIN;
                }
index 98c1e993b114532a088b81deb9a40c65e4d1d759..c888e98682142dc9ef65755309f9d316d36369b9 100644 (file)
 #define VM_OFFSET(a)   ((a)->vm_pgoff * PAGE_SIZE)
 #endif
 
+#if LINUX_VERSION_CODE < 0x020500
+#define REMAP_PAGE_RANGE(a,b,c,d,e) remap_page_range(b,c,d,e)
+#else
+#define REMAP_PAGE_RANGE(a,b,c,d,e) remap_page_range(a,b,c,d,e)
+#endif
+
 #include_next <linux/mm.h>
 
 #endif /* _COMPAT_MM_H */