new files
authorDavid Schleef <ds@schleef.org>
Tue, 7 Nov 2000 20:22:46 +0000 (20:22 +0000)
committerDavid Schleef <ds@schleef.org>
Tue, 7 Nov 2000 20:22:46 +0000 (20:22 +0000)
include/linux/module.h [new file with mode: 0644]
include/linux/pci.h [new file with mode: 0644]

diff --git a/include/linux/module.h b/include/linux/module.h
new file mode 100644 (file)
index 0000000..e7e38d1
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * module.h compatibility header
+ */
+
+#ifndef _COMPAT_MODULE_H
+#define _COMPAT_MODULE_H
+
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < 0x020115
+#define MODULE_AUTHOR(a)
+#define MODULE_DESCRIPTION(a)
+#define MODULE_PARM(a,b)
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18)                /* ? */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0)
+  #ifdef MODULE
+    /* don't ask.  It works. */
+    #define THIS_MODULE                        ((struct module *)&mod_use_count_)
+  #else
+    #define THIS_MODULE        NULL
+  #endif
+  #define __MOD_INC_USE_COUNT(x)       ((*(long *)(x))++, (*(long *)(x)) |= MOD_VISITED)
+  #define __MOD_DEC_USE_COUNT(x)       ((*(long *)(x))--, (*(long *)(x)) |= MOD_VISITED)
+#else
+  #ifdef MODULE
+    #define THIS_MODULE        &__this_module
+  #else
+    #define THIS_MODULE        NULL
+  #endif
+#endif
+#endif
+
+#include_next <linux/module.h>
+
+#endif /* _COMPAT_MODULE_H */
+
+
+
+
diff --git a/include/linux/pci.h b/include/linux/pci.h
new file mode 100644 (file)
index 0000000..f3ebbfd
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * linux/pci.h compatibility header
+ */
+
+#ifndef _COMPAT_PCI_H
+#define _COMPAT_PCI_H
+
+#include <linux/version.h>
+
+
+#if LINUX_VERSION_CODE < 0x020155
+#include <linux/bios32.h>
+#define PCI_SUPPORT_VER1
+#else
+#include_next <linux/pci.h>
+#define PCI_SUPPORT_VER2
+
+#if LINUX_VERSION_CODE < 0x020300 /* XXX */
+
+#define pci_for_each_dev(x)    \
+       for((x)=pci_devices;(x);(x)=(x)->next)
+
+#else
+
+#endif
+#endif
+
+
+#endif /* _COMPAT_PCI_H */
+
+
+
+