mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-02 07:15:39 +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:
@@ -168,7 +168,7 @@ int piix4_setup(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Everything is happy, let's grab the memory and set things up. */
|
/* 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
|
#ifdef DEBUG
|
||||||
if ((temp & 0x0E) == 8)
|
if ((temp & 0x0E) == 8)
|
||||||
@@ -376,7 +376,7 @@ int piix4_init(void)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
piix4_initialized ++;
|
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.id = ALGO_SMBUS | SMBUS_PIIX4;
|
||||||
piix4_adapter.algo = &smbus_algorithm;
|
piix4_adapter.algo = &smbus_algorithm;
|
||||||
piix4_adapter.smbus_access = &piix4_access;
|
piix4_adapter.smbus_access = &piix4_access;
|
||||||
|
@@ -174,7 +174,6 @@ int lm75_attach_adapter(struct i2c_adapter *adapter)
|
|||||||
lm75_write_value(new_client,LM75_REG_CONF,0);
|
lm75_write_value(new_client,LM75_REG_CONF,0);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* OK, this is not exactly good programming practice, usually. But it is
|
/* OK, this is not exactly good programming practice, usually. But it is
|
||||||
very code-efficient in this case. */
|
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 lm75_init(void)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
|
@@ -68,7 +68,7 @@ int sensors_create_name(char **name, const char *prefix,
|
|||||||
if (i2c_is_isa_adapter(adapter))
|
if (i2c_is_isa_adapter(adapter))
|
||||||
sprintf(name_buffer,"%s-isa-%04x",prefix,addr);
|
sprintf(name_buffer,"%s-isa-%04x",prefix,addr);
|
||||||
else {
|
else {
|
||||||
if ((id = i2c_adapter_id(adapter)) < 0);
|
if ((id = i2c_adapter_id(adapter)) < 0)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
sprintf(name_buffer,"%s-i2c-%d-%02x",prefix,id,addr);
|
sprintf(name_buffer,"%s-i2c-%d-%02x",prefix,id,addr);
|
||||||
}
|
}
|
||||||
|
@@ -174,7 +174,6 @@ int lm75_attach_adapter(struct i2c_adapter *adapter)
|
|||||||
lm75_write_value(new_client,LM75_REG_CONF,0);
|
lm75_write_value(new_client,LM75_REG_CONF,0);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* OK, this is not exactly good programming practice, usually. But it is
|
/* OK, this is not exactly good programming practice, usually. But it is
|
||||||
very code-efficient in this case. */
|
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 lm75_init(void)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
|
@@ -168,7 +168,7 @@ int piix4_setup(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Everything is happy, let's grab the memory and set things up. */
|
/* 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
|
#ifdef DEBUG
|
||||||
if ((temp & 0x0E) == 8)
|
if ((temp & 0x0E) == 8)
|
||||||
@@ -376,7 +376,7 @@ int piix4_init(void)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
piix4_initialized ++;
|
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.id = ALGO_SMBUS | SMBUS_PIIX4;
|
||||||
piix4_adapter.algo = &smbus_algorithm;
|
piix4_adapter.algo = &smbus_algorithm;
|
||||||
piix4_adapter.smbus_access = &piix4_access;
|
piix4_adapter.smbus_access = &piix4_access;
|
||||||
|
@@ -68,7 +68,7 @@ int sensors_create_name(char **name, const char *prefix,
|
|||||||
if (i2c_is_isa_adapter(adapter))
|
if (i2c_is_isa_adapter(adapter))
|
||||||
sprintf(name_buffer,"%s-isa-%04x",prefix,addr);
|
sprintf(name_buffer,"%s-isa-%04x",prefix,addr);
|
||||||
else {
|
else {
|
||||||
if ((id = i2c_adapter_id(adapter)) < 0);
|
if ((id = i2c_adapter_id(adapter)) < 0)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
sprintf(name_buffer,"%s-i2c-%d-%02x",prefix,id,addr);
|
sprintf(name_buffer,"%s-i2c-%d-%02x",prefix,id,addr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user