mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-10 16:30:50 +00:00
Several small patches to make everything compile against all 2.0.x
kernels, even early ones. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@477 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
d42004ee6c
commit
29a33cac35
7 files changed
+34
-1
No files matched your search
@@ -19,6 +19,9 @@ Here come the changes:
|
||||
|
||||
! Changed to init_MUTEX and a compatibility line in i2c-core.c
|
||||
|
||||
! i2c.h now includes <linux/schedule.h> instead of <asm/semaphore.h> for old
|
||||
2.0 kernels
|
||||
|
||||
* Algo-bit now scans the bus before registering the adapter.
|
||||
|
||||
* Bit-lp and bit-velle don't increase module usage counts
|
||||
|
||||
@@ -31,8 +31,12 @@
|
||||
#include <asm/spinlock.h> /* for spinlock_t */
|
||||
#else
|
||||
#include <asm/page.h> /* Needed for 2.2 kernels */
|
||||
#if LINUX_VERSION_CODE < 0x020019
|
||||
#include <linux/sched.h>
|
||||
#else
|
||||
#include <asm/semaphore.h>
|
||||
#endif
|
||||
#endif
|
||||
/* --- General options ------------------------------------------------ */
|
||||
|
||||
#define I2C_ALGO_MAX 4 /* control memory consumption */
|
||||
|
||||
@@ -27,12 +27,18 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#include "compat.h"
|
||||
|
||||
#include "i2c.h"
|
||||
#ifdef I2C_SPINLOCK
|
||||
#include <asm/spinlock.h>
|
||||
#else
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,0,19)
|
||||
#include <linux/sched.h>
|
||||
#else
|
||||
#include <asm/semaphore.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "version.h"
|
||||
#include "i2c-isa.h"
|
||||
|
||||
@@ -94,8 +94,14 @@
|
||||
#endif
|
||||
|
||||
/* For old 2.0 kernels */
|
||||
#ifndef PCI_DEVICE_ID_VIA_82C586_3
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,0,34))
|
||||
#define PCI_DEVICE_ID_VIA_82C586_3 0x3040
|
||||
#define PCI_DEVICE_ID_AL_M7101 0x7101
|
||||
#endif
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,0,31))
|
||||
#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113
|
||||
#define PCI_VENDOR_ID_APPLE 0x106b
|
||||
#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e
|
||||
#endif
|
||||
|
||||
#endif /* SENSORS_COMPAT_H */
|
||||
@@ -39,8 +39,12 @@
|
||||
#ifdef I2C_SPINLOCK
|
||||
#include <asm/spinlock.h>
|
||||
#else
|
||||
#if LINUX_VERSION_CODE < 0x020019
|
||||
#include <linux/sched.h>
|
||||
#else
|
||||
#include <asm/semaphore.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LM_SENSORS /* TBD */
|
||||
#include "i2c.h" /* TBD */
|
||||
|
||||
@@ -58,8 +58,12 @@ union smbus_data {
|
||||
#ifdef I2C_SPINLOCK
|
||||
#include <asm/spinlock.h>
|
||||
#else
|
||||
#if LINUX_VERSION_CODE < 0x020019
|
||||
#include <linux/sched.h>
|
||||
#else
|
||||
#include <asm/semaphore.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LM_SENSORS /* TBD */
|
||||
#include "i2c.h" /* TBD */
|
||||
|
||||
@@ -23,12 +23,18 @@
|
||||
#include <linux/stddef.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
#include "compat.h"
|
||||
|
||||
#include "i2c.h"
|
||||
#ifdef I2C_SPINLOCK
|
||||
#include <asm/spinlock.h>
|
||||
#else
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,0,19)
|
||||
#include <linux/sched.h>
|
||||
#else
|
||||
#include <asm/semaphore.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "version.h"
|
||||
#include "smbus.h"
|
||||
|
||||
Reference in new issue
Block a user