--- /dev/null
+/*
+ * asm/page.h compatibility header
+ */
+
+#ifndef __COMPAT_PAGE_TYPES_H_
+#define __COMPAT_PAGE_TYPES_H_
+
+#include <linux/version.h>
+#include_next <asm/page.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,1)
+/* Pure 2^n version of get_order */
+static __inline__ int get_order(unsigned long size)
+{
+ int order;
+
+ size = (size-1) >> (PAGE_SHIFT-1);
+ order = -1;
+ do {
+ size >>= 1;
+ order++;
+ } while (size);
+ return order;
+}
+#endif
+
+#endif // __COMPAT_ASM_PAGE_H_
+
{
if(dev->base_address[i] & PCI_BASE_ADDRESS_SPACE_IO)
request_region(pci_resource_start(dev, i),
- fake_length);
+ fake_length, name);
}
}
#include <linux/version.h>
-// XXX 2.2.19 already has vmalloc_32() compatibility, not sure when it was introduced
-#if LINUX_VERSION_CODE < 0x020200
-#define vmalloc_32(x) vmalloc((x))
-#endif
#if LINUX_VERSION_CODE < 0x020200
#else
#include_next <linux/vmalloc.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 18)
+extern inline void * vmalloc_32(unsigned long size)
+{
+ return vmalloc(size);
+}
+#endif // 2.2.18
+
#endif
#endif