From 44a1fb3cfae3f0e904ff1bcd16d18c191206d20a Mon Sep 17 00:00:00 2001 From: David Schleef Date: Tue, 7 Nov 2000 20:22:46 +0000 Subject: [PATCH] new files --- include/linux/module.h | 41 +++++++++++++++++++++++++++++++++++++++++ include/linux/pci.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 include/linux/module.h create mode 100644 include/linux/pci.h diff --git a/include/linux/module.h b/include/linux/module.h new file mode 100644 index 00000000..e7e38d13 --- /dev/null +++ b/include/linux/module.h @@ -0,0 +1,41 @@ +/* + * module.h compatibility header + */ + +#ifndef _COMPAT_MODULE_H +#define _COMPAT_MODULE_H + +#include + +#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 + +#endif /* _COMPAT_MODULE_H */ + + + + diff --git a/include/linux/pci.h b/include/linux/pci.h new file mode 100644 index 00000000..f3ebbfd3 --- /dev/null +++ b/include/linux/pci.h @@ -0,0 +1,33 @@ +/* + * linux/pci.h compatibility header + */ + +#ifndef _COMPAT_PCI_H +#define _COMPAT_PCI_H + +#include + + +#if LINUX_VERSION_CODE < 0x020155 +#include +#define PCI_SUPPORT_VER1 +#else +#include_next +#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 */ + + + + -- 2.26.2