mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-23 11:54:33 +00:00
fix lm93_read_block which was retrying even on success.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2788 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
89508412a2
commit
b92d85efbc
2 files changed
+6
-2
No files matched your search
+4
-2
@@ -444,13 +444,15 @@ static u8 lm93_block_buffer[I2C_SMBUS_BLOCK_MAX];
|
||||
*/
|
||||
static void lm93_read_block(struct i2c_client *client, u8 fbn, u8 *values)
|
||||
{
|
||||
int i, result;
|
||||
int i, result=0;
|
||||
|
||||
for (i = 1; i <= MAX_RETRIES; i++) {
|
||||
result = i2c_smbus_read_block_data(client,
|
||||
lm93_block_read_cmds[fbn].cmd, lm93_block_buffer);
|
||||
|
||||
if (result != lm93_block_read_cmds[fbn].len) {
|
||||
if (result == lm93_block_read_cmds[fbn].len) {
|
||||
break;
|
||||
} else {
|
||||
printk(KERN_WARNING "lm93.o: block read data failed, "
|
||||
"command 0x%02x.\n",
|
||||
lm93_block_read_cmds[fbn].cmd);
|
||||
|
||||
Reference in new issue
Block a user