remap_page_range() -> remap_pfn_range() (2.6.11 compilation)

Hi.

Somwhere around 2.6.9 kernel remap_pfn_range() was introduced as a 
portable replacement for remap_page_range,
presumably with some wrapper which has dissapeared recently (2.6.11), 
what resulted in "Unknown symbol" while
loading comedi module (and the following ones because of the symbols in it).

I've changed include/linux/mm.h slightly, hopefully without breaking 
anything.

Cheers,
    W.
diff -ur comedi-20050314.orig/include/linux/mm.h comedi-20050314/include/linux/mm.h
--- comedi-20050314.orig/include/linux/mm.h	2005-03-14 11:53:11.000000000 +0100
+++ comedi-20050314/include/linux/mm.h	2005-03-14 11:53:25.000000000 +0100
_at__at_ -24,8 +24,10 _at__at_
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,3) && !defined(tlb_vma)
 #define REMAP_PAGE_RANGE(a,b,c,d,e) remap_page_range(b,c,d,e)
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) && !defined(tlb_vma)
 #define REMAP_PAGE_RANGE(a,b,c,d,e) remap_page_range(a,b,c,d,e)
+#else
+#define REMAP_PAGE_RANGE(a,b,c,d,e) remap_pfn_range(a,b,c,d,e)
 #endif
 
 #endif /* _COMPAT_MM_H */

Received on 2005-03-14Z11:25:20