From: Bernd Porr Date: Mon, 25 Apr 2005 08:03:18 +0000 (+0000) Subject: Wiktor Grebla wrote in the comedi mailing list: X-Git-Tag: branch-0_7-end~67 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d6c72a9c004652bada6bfc5826fdddc750ceec2d;p=comedi.git Wiktor Grebla wrote in the comedi mailing list: 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. --- diff --git a/include/linux/mm.h b/include/linux/mm.h index 1bde4dbf..1e5bd1db 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -24,8 +24,10 @@ #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)