2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-30 22:05:11 +00:00

Fixed some more bugs

* PIIX4: better names in /proc files
* sensors.c: fixed bug which prevented registration of non-ISA clients

Status:
* lm75 inserts happily and interacts with the PIIX4 correctly
* lm75 readings are still wrong (all 0xff)
* lm75 insertion with ISA bus present causes oops


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@39 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard
1998-12-05 16:36:47 +00:00
parent 61d74f13e0
commit e0484650ef
6 changed files with 6 additions and 14 deletions

View File

@@ -168,7 +168,7 @@ int piix4_setup(void)
}
/* Everything is happy, let's grab the memory and set things up. */
request_region(piix4_smba, 8, "SMBus");
request_region(piix4_smba, 8, "piix4");
#ifdef DEBUG
if ((temp & 0x0E) == 8)
@@ -376,7 +376,7 @@ int piix4_init(void)
return res;
}
piix4_initialized ++;
strcpy(piix4_adapter.name,"SMBus PIIX4 adapter");
sprintf(piix4_adapter.name,"SMBus PIIX4 adapter at %04x",piix4_smba);
piix4_adapter.id = ALGO_SMBUS | SMBUS_PIIX4;
piix4_adapter.algo = &smbus_algorithm;
piix4_adapter.smbus_access = &piix4_access;

View File

@@ -174,7 +174,6 @@ int lm75_attach_adapter(struct i2c_adapter *adapter)
lm75_write_value(new_client,LM75_REG_CONF,0);
continue;
/* OK, this is not exactly good programming practice, usually. But it is
very code-efficient in this case. */
@@ -301,9 +300,6 @@ void lm75_temp(struct i2c_client *client, int operation, int ctl_name,
}
}
int lm75_init(void)
{
int res;

View File

@@ -68,7 +68,7 @@ int sensors_create_name(char **name, const char *prefix,
if (i2c_is_isa_adapter(adapter))
sprintf(name_buffer,"%s-isa-%04x",prefix,addr);
else {
if ((id = i2c_adapter_id(adapter)) < 0);
if ((id = i2c_adapter_id(adapter)) < 0)
return -ENOENT;
sprintf(name_buffer,"%s-i2c-%d-%02x",prefix,id,addr);
}

View File

@@ -174,7 +174,6 @@ int lm75_attach_adapter(struct i2c_adapter *adapter)
lm75_write_value(new_client,LM75_REG_CONF,0);
continue;
/* OK, this is not exactly good programming practice, usually. But it is
very code-efficient in this case. */
@@ -301,9 +300,6 @@ void lm75_temp(struct i2c_client *client, int operation, int ctl_name,
}
}
int lm75_init(void)
{
int res;

View File

@@ -168,7 +168,7 @@ int piix4_setup(void)
}
/* Everything is happy, let's grab the memory and set things up. */
request_region(piix4_smba, 8, "SMBus");
request_region(piix4_smba, 8, "piix4");
#ifdef DEBUG
if ((temp & 0x0E) == 8)
@@ -376,7 +376,7 @@ int piix4_init(void)
return res;
}
piix4_initialized ++;
strcpy(piix4_adapter.name,"SMBus PIIX4 adapter");
sprintf(piix4_adapter.name,"SMBus PIIX4 adapter at %04x",piix4_smba);
piix4_adapter.id = ALGO_SMBUS | SMBUS_PIIX4;
piix4_adapter.algo = &smbus_algorithm;
piix4_adapter.smbus_access = &piix4_access;

View File

@@ -68,7 +68,7 @@ int sensors_create_name(char **name, const char *prefix,
if (i2c_is_isa_adapter(adapter))
sprintf(name_buffer,"%s-isa-%04x",prefix,addr);
else {
if ((id = i2c_adapter_id(adapter)) < 0);
if ((id = i2c_adapter_id(adapter)) < 0)
return -ENOENT;
sprintf(name_buffer,"%s-i2c-%d-%02x",prefix,id,addr);
}