Updates for 2.0.x kernel compilation

Most important change: GL518SM-rev00 can't use kernel threads on 2.0 and
early 2.1 kernels


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@563 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard committed 1999-09-13 20:55:49 +00:00
1 parent d529d90336
commit 399608b208
4 files changed
+58 -8

No files matched your search

+27 -4
View File
@@ -699,15 +699,22 @@ sub main
#ifdef MODULE
#include <linux/module.h>
#endif /* def MODULE */
#ifndef MODULE_AUTHOR
#define MODULE_AUTHOR(whatever)
#define MODULE_AUTHOR(noone)
#endif
#ifndef MODULE_DESCRIPTION
#define MODULE_DESCRIPTION(whatever)
#define MODULE_DESCRIPTION(none)
#endif
#ifndef MODULE_PARM
#define MODULE_PARM(no,param)
#endif
#ifndef MODULE_PARM_DESC
#define MODULE_PARM_DESC(no,description)
#endif /* def MODULE */
EOF
if (`grep KERNEL_VERSION "$package_root/$package_file"`) {
print OUTPUT << 'EOF';
#include <linux/version.h>
@@ -715,6 +722,22 @@ EOF
#define KERNEL_VERSION(a,b,c) (((a) << 16) | ((b) << 8) | (c))
#endif
EOF
}
if (`grep EXPORT_NO_SYMBOLS "$package_root/$package_file"`) {
print OUTPUT << 'EOF';
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0)
#define EXPORT_NO_SYMBOLS
#endif
EOF
}
if (`grep EXPORT_SYMBOL "$package_root/$package_file"`) {
print OUTPUT << 'EOF';
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0)
#define EXPORT_SYMBOL(noexport)
#endif
EOF
}
if (`grep 'copy_from_user\\|copy_to_user\\|get_user_data' "$package_root/$package_file"`) {
@@ -772,7 +795,7 @@ EOF
EOF
}
if (`grep 'ioremap\|iounmap' "$package_root/$package_file"`) {
if (`grep 'ioremap\\|iounmap' "$package_root/$package_file"`) {
print OUTPUT << 'EOF';
/* I hope this is always correct, even for the PPC, but I really think so.
And yes, the kernel version is exactly correct */
@@ -837,7 +860,7 @@ EOF
#endif
EOF
}
if (`grep 'PCI_DEVICE_ID_INTEL_82801AA_3\|PCI_DEVICE_ID_INTEL_82801AB_3' "$package_root/$package_file"`) {
if (`grep 'PCI_DEVICE_ID_INTEL_82801AA_3\\|PCI_DEVICE_ID_INTEL_82801AB_3' "$package_root/$package_file"`) {
print OUTPUT << 'EOF';
#ifndef PCI_DEVICE_ID_INTEL_82801AA_3
#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413