Bradley M. Keryan's patches to make lm_sensors compile against

2.3.x kernels (x >= 1).


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@467 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard committed 1999-06-02 18:19:38 +00:00
1 parent 9e9a78774a
commit f1888417ca
17 files changed
+36 -18

No files matched your search

+3
View File
@@ -3,6 +3,9 @@ Many, many things. Most notably:
KERNEL MODULES
==============
* linux/Documentation/devices.txt lists i2c0, i2c1 etc. instead of i2c-0, i2c-1
* LM78 detection: Tom Webster has proven that the reset bit in the
id register can be one (strange!)
* Check for kernel 2.0.8 warnings
* Increase use count of adapter driver if directory of chip is entered
* maxilife.c: Introduce new insmod variables
+2
View File
@@ -17,6 +17,8 @@ Here come the changes:
! Fixed i2c_probe bug
! Changed to init_MUTEX and a compatibility line in i2c-core.c
* Algo-bit now scans the bus before registering the adapter.
* Bit-lp and bit-velle don't increase module usage counts
+5 -1
View File
@@ -26,6 +26,10 @@
#include <linux/malloc.h>
#include "i2c.h"
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1))
#define init_MUTEX(s) do { *(s) = MUTEX; } while(0)
#endif
/* ----- global defines ---------------------------------------------------- */
@@ -138,7 +142,7 @@ int i2c_add_adapter(struct i2c_adapter *adap)
#ifdef I2C_SPINLOCK
adap->lock = (spinlock_t)SPIN_LOCK_UNLOCKED;
#else
adap->lock = MUTEX;
init_MUTEX(&adap->lock);
#endif
/* inform drivers of new adapters */
+2 -1
View File
@@ -26,6 +26,7 @@
#include "i2c.h"
#include "i2c-isa.h"
#include "version.h"
#include "compat.h"
/* Addresses to scan */
static unsigned short normal_i2c[] = {SENSORS_I2C_END};
@@ -269,7 +270,7 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address, int kind)
adm1021_list[i] = new_client;
new_client->id = i;
data->valid = 0;
data->update_lock = MUTEX;
init_MUTEX(&data->update_lock);
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
+1 -1
View File
@@ -419,7 +419,7 @@ static int adm9240_detect(struct i2c_adapter *adapter, int address, int kind)
adm9240_list[i] = new_client;
new_client->id = i;
data->valid = 0;
data->update_lock = MUTEX;
init_MUTEX(&data->update_lock);
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
+2 -1
View File
@@ -28,6 +28,7 @@
#include "i2c.h"
#include "i2c-isa.h"
#include "version.h"
#include "compat.h"
/* Addresses to scan */
static unsigned short normal_i2c[] = {SENSORS_I2C_END};
@@ -227,7 +228,7 @@ printk("bt869.o: probing address %d .\n",address);
bt869_list[i] = new_client;
new_client->id = i;
data->valid = 0;
data->update_lock = MUTEX;
init_MUTEX(&data->update_lock);
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
+2 -1
View File
@@ -26,6 +26,7 @@
#include "i2c.h"
#include "i2c-isa.h"
#include "version.h"
#include "compat.h"
/* Addresses to scan */
static unsigned short normal_i2c[] = {SENSORS_I2C_END};
@@ -224,7 +225,7 @@ int eeprom_detect(struct i2c_adapter *adapter, int address, int kind)
eeprom_list[i] = new_client;
new_client->id = i;
data->valid = 0;
data->update_lock = MUTEX;
init_MUTEX(&data->update_lock);
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
+1 -1
View File
@@ -348,7 +348,7 @@ static int gl518_detect(struct i2c_adapter *adapter, int address, int kind)
gl518_list[i] = new_client;
new_client->id = i;
data->valid = 0;
data->update_lock = MUTEX;
init_MUTEX(&data->update_lock);
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
+1 -1
View File
@@ -176,7 +176,7 @@ int icspll_attach_adapter(struct i2c_adapter *adapter)
new_client->driver = &icspll_driver;
strcpy(new_client->name,"ICSPLL chip");
data->valid = 0;
data->update_lock = MUTEX;
init_MUTEX(&data->update_lock);
/* fill data structure so unknown registers are 0xFF */
data->data[0] = ICSPLL_SIZE;
for(i = 1; i <= ICSPLL_SIZE; i++)
+2 -1
View File
@@ -25,6 +25,7 @@
#include "i2c.h"
#include "i2c-isa.h"
#include "version.h"
#include "compat.h"
/* Addresses to scan */
static unsigned short normal_i2c[] = {SENSORS_I2C_END};
@@ -204,7 +205,7 @@ int lm75_detect(struct i2c_adapter *adapter, int address, int kind)
lm75_list[i] = new_client;
new_client->id = i;
data->valid = 0;
data->update_lock = MUTEX;
init_MUTEX(&data->update_lock);
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
+2 -2
View File
@@ -357,7 +357,7 @@ int lm78_detect(struct i2c_adapter *adapter, int address, int kind)
data = (struct lm78_data *) (((struct isa_client *) new_client) + 1);
new_client->addr = 0;
((struct isa_client *) new_client)->isa_addr = address;
data->lock = MUTEX;
init_MUTEX(&data->lock);
} else {
data = (struct lm78_data *) (((struct i2c_client *) new_client) + 1);
new_client->addr = address;
@@ -428,7 +428,7 @@ int lm78_detect(struct i2c_adapter *adapter, int address, int kind)
lm78_list[i] = new_client;
new_client->id = i;
data->valid = 0;
data->update_lock = MUTEX;
init_MUTEX(&data->update_lock);
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
+1 -1
View File
@@ -357,7 +357,7 @@ int lm80_detect(struct i2c_adapter *adapter, int address, int kind)
lm80_list[i] = new_client;
new_client->id = i;
data->valid = 0;
data->update_lock = MUTEX;
init_MUTEX(&data->update_lock);
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
+2 -1
View File
@@ -48,6 +48,7 @@
#include "i2c.h"
#include "i2c-isa.h"
#include "version.h"
#include "compat.h"
/* Addresses to scan */
static unsigned short normal_i2c[] = {SENSORS_I2C_END};
@@ -206,7 +207,7 @@ int ltc1710_detect(struct i2c_adapter *adapter, int address, int kind)
ltc1710_list[i] = new_client;
new_client->id = i;
data->valid = 0;
data->update_lock = MUTEX;
init_MUTEX(&data->update_lock);
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
+2 -2
View File
@@ -415,8 +415,8 @@ int maxi_new_client(struct i2c_adapter *adapter,
new_client->driver = &maxi_driver;
data = new_client->data;
data->valid = 0;
data->lock = MUTEX;
data->update_lock = MUTEX;
init_MUTEX(&data->lock);
init_MUTEX(&data->update_lock);
return 0;
}
+2 -2
View File
@@ -358,7 +358,7 @@ int sis5595_detect(struct i2c_adapter *adapter, int address, int kind)
data = (struct sis5595_data *) (((struct isa_client *) new_client) + 1);
new_client->addr = 0;
((struct isa_client *) new_client)->isa_addr = address;
data->lock = MUTEX;
init_MUTEX(&data->lock);
new_client->data = data;
new_client->adapter = adapter;
new_client->driver = &sis5595_driver;
@@ -402,7 +402,7 @@ int sis5595_detect(struct i2c_adapter *adapter, int address, int kind)
sis5595_list[i] = new_client;
new_client->id = i;
data->valid = 0;
data->update_lock = MUTEX;
init_MUTEX(&data->update_lock);
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
+2 -2
View File
@@ -693,7 +693,7 @@ int w83781d_detect(struct i2c_adapter *adapter, int address, int kind)
data = (struct w83781d_data *) (((struct i2c_client *) new_client) + 1);
new_client->addr = address;
}
data->lock = MUTEX;
init_MUTEX(&data->lock);
new_client->data = data;
new_client->adapter = adapter;
new_client->driver = &w83781d_driver;
@@ -777,7 +777,7 @@ int w83781d_detect(struct i2c_adapter *adapter, int address, int kind)
w83781d_list[i] = new_client;
new_client->id = i;
data->valid = 0;
data->update_lock = MUTEX;
init_MUTEX(&data->update_lock);
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
+4
View File
@@ -89,4 +89,8 @@
#define iounmap vfree
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1))
#define init_MUTEX(s) do { *(s) = MUTEX; } while(0)
#endif
#endif /* SENSORS_COMPAT_H */