Wiktor Grebla wrote in the comedi mailing list:
authorBernd Porr <Bernd.Porr@f2s.com>
Mon, 25 Apr 2005 08:03:18 +0000 (08:03 +0000)
committerBernd Porr <Bernd.Porr@f2s.com>
Mon, 25 Apr 2005 08:03:18 +0000 (08:03 +0000)
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.
Seems to work. I've tested it with 2.6.10 and 2.6.11.

include/linux/mm.h

index 1bde4dbf7086465be948fe540e2426ed95bc5dd5..1e5bd1db4eca6c290522bec683b51f9f0246caa3 100644 (file)
 
 #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
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)