(Frodo) Several minor things

* Made i2c-voodoo3.c compile with 2.0 kernels
    It should also run without problem, but obviously I could not test it
    Changes are in the memory mapping of PCI address space
  * Removed several warning from i2c-voodoo3.c
    It compiles now without any warnings, even with WARN=1
  * Removed several warnings from matorb.c
    It compiles now without any warnings, even with WARN=1
    In the proces, I fixed one serious bug (assignment instead of comparison)
  * Removed a warning from w83781d.c
    It compiles now without any warnings, even with WARN=1

Hint: Once in a while, try to compile with WARN=1 and remove warnings. It
helps to find serious, hidden problems. Really!


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@472 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard committed 1999-06-06 14:06:04 +00:00
1 parent ed9ebe477b
commit 86ba0c96fd
4 files changed
+34 -27

No files matched your search

+4 -3
View File
@@ -29,6 +29,7 @@
#include "i2c.h"
#include "i2c-isa.h"
#include "version.h"
#include "compat.h"
/* Addresses to scan */
static unsigned short normal_i2c[] = {0x2E,SENSORS_I2C_END};
@@ -198,7 +199,6 @@ ERROR3:
if (new_client == matorb_list[i])
matorb_list[i] = NULL;
ERROR2:
ERROR1:
kfree(new_client);
ERROR0:
return err;
@@ -252,6 +252,7 @@ void matorb_dec_use (struct i2c_client *client)
#endif
}
#if 0
/* All registers are word-sized, except for the configuration register.
MATORB uses a high-byte first convention, which is exactly opposite to
the usual practice. */
@@ -259,13 +260,14 @@ int matorb_read_value(struct i2c_client *client, u8 reg)
{
return -1; /* Doesn't support reads */
}
#endif
/* All registers are word-sized, except for the configuration register.
MATORB uses a high-byte first convention, which is exactly opposite to
the usual practice. */
int matorb_write_value(struct i2c_client *client, u8 reg, u16 value)
{
if (reg=0) {
if (reg==0) {
return smbus_write_byte(client->adapter,client->addr,value);
} else {
return smbus_write_byte_data(client->adapter,client->addr,reg,value);
@@ -302,7 +304,6 @@ void matorb_update_client(struct i2c_client *client)
void matorb_disp(struct i2c_client *client, int operation, int ctl_name,
int *nrels_mag, long *results)
{
struct matorb_data *data = client->data;
if (operation == SENSORS_PROC_REAL_INFO)
*nrels_mag = 0;
else if (operation == SENSORS_PROC_REAL_READ) {
+1 -1
View File
@@ -1366,7 +1366,7 @@ void w83781d_fan_div(struct i2c_client *client, int operation, int ctl_name,
int *nrels_mag, long *results)
{
struct w83781d_data *data = client->data;
int old,old2,old3;
int old,old2,old3=0;
if (operation == SENSORS_PROC_REAL_INFO)
*nrels_mag = 0;