mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-28 20:58:22 +00:00
add failure printks
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2094 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
bd719fa164
commit
9098477852
2 files changed
+14
-10
No files matched your search
@@ -318,19 +318,21 @@ static void ddcmon_update_client(struct i2c_client *client)
|
||||
for (i=0; i<DDCMON_SIZE; i+=I2C_SMBUS_I2C_BLOCK_MAX)
|
||||
if (i2c_smbus_read_i2c_block_data(client,
|
||||
i, data->data + i)
|
||||
!= I2C_SMBUS_I2C_BLOCK_MAX)
|
||||
!= I2C_SMBUS_I2C_BLOCK_MAX) {
|
||||
printk(KERN_WARNING "ddcmon.o: block read fail at 0x%.2x!\n", i);
|
||||
goto DONE;
|
||||
}
|
||||
} else {
|
||||
if (i2c_smbus_write_byte(client, 0)) {
|
||||
#ifdef DEBUG
|
||||
printk("ddcmon read start has failed!\n");
|
||||
#endif
|
||||
printk(KERN_WARNING "ddcmon.o: read start fail at 0!\n");
|
||||
goto DONE;
|
||||
}
|
||||
for (i = 0; i < DDCMON_SIZE; i++) {
|
||||
j = i2c_smbus_read_byte(client);
|
||||
if (j < 0)
|
||||
if (j < 0) {
|
||||
printk(KERN_WARNING "eeprom.o: read fail at 0x%.2x!\n", i);
|
||||
goto DONE;
|
||||
}
|
||||
data->data[i] = (u8) j;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,19 +335,21 @@ static void eeprom_update_client(struct i2c_client *client, u8 slice)
|
||||
i += I2C_SMBUS_I2C_BLOCK_MAX)
|
||||
if (i2c_smbus_read_i2c_block_data(client,
|
||||
i, data->data + i)
|
||||
!= I2C_SMBUS_I2C_BLOCK_MAX)
|
||||
!= I2C_SMBUS_I2C_BLOCK_MAX) {
|
||||
printk(KERN_WARNING "eeprom.o: block read fail at 0x%.2x!\n", i);
|
||||
goto DONE;
|
||||
}
|
||||
} else {
|
||||
if (i2c_smbus_write_byte(client, slice << 5)) {
|
||||
#ifdef DEBUG
|
||||
printk("eeprom read start has failed!\n");
|
||||
#endif
|
||||
printk(KERN_WARNING "eeprom.o: read start fail at 0x%.2x!\n", slice << 5);
|
||||
goto DONE;
|
||||
}
|
||||
for (i = slice << 5; i < (slice + 1) << 5; i++) {
|
||||
j = i2c_smbus_read_byte(client);
|
||||
if (j < 0)
|
||||
if (j < 0) {
|
||||
printk(KERN_WARNING "eeprom.o: read fail at 0x%.2x!\n", i);
|
||||
goto DONE;
|
||||
}
|
||||
data->data[i] = (u8) j;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user