Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273582
b: refs/heads/master
c: 8dc089d
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Nov 4, 2011
1 parent e5e619b commit 6dd49cc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da8ebe4e09ee5661f125a8401ade58baf226aa57
refs/heads/master: 8dc089d68b125179b1c97e75d29623472d99c68b
31 changes: 16 additions & 15 deletions trunk/drivers/hwmon/lm90.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,14 +1117,12 @@ static int lm90_detect(struct i2c_client *new_client,
return -ENODEV;

/* detection and identification */
if ((man_id = i2c_smbus_read_byte_data(new_client,
LM90_REG_R_MAN_ID)) < 0
|| (chip_id = i2c_smbus_read_byte_data(new_client,
LM90_REG_R_CHIP_ID)) < 0
|| (reg_config1 = i2c_smbus_read_byte_data(new_client,
LM90_REG_R_CONFIG1)) < 0
|| (reg_convrate = i2c_smbus_read_byte_data(new_client,
LM90_REG_R_CONVRATE)) < 0)
man_id = i2c_smbus_read_byte_data(new_client, LM90_REG_R_MAN_ID);
chip_id = i2c_smbus_read_byte_data(new_client, LM90_REG_R_CHIP_ID);
reg_config1 = i2c_smbus_read_byte_data(new_client, LM90_REG_R_CONFIG1);
reg_convrate = i2c_smbus_read_byte_data(new_client,
LM90_REG_R_CONVRATE);
if (man_id < 0 || chip_id < 0 || reg_config1 < 0 || reg_convrate < 0)
return -ENODEV;

if (man_id == 0x01 || man_id == 0x5C || man_id == 0x41) {
Expand Down Expand Up @@ -1192,13 +1190,16 @@ static int lm90_detect(struct i2c_client *new_client,
* exists, both readings will reflect the same value. Otherwise,
* the readings will be different.
*/
if ((reg_emerg = i2c_smbus_read_byte_data(new_client,
MAX6659_REG_R_REMOTE_EMERG)) < 0
|| i2c_smbus_read_byte_data(new_client, LM90_REG_R_MAN_ID) < 0
|| (reg_emerg2 = i2c_smbus_read_byte_data(new_client,
MAX6659_REG_R_REMOTE_EMERG)) < 0
|| (reg_status2 = i2c_smbus_read_byte_data(new_client,
MAX6696_REG_R_STATUS2)) < 0)
reg_emerg = i2c_smbus_read_byte_data(new_client,
MAX6659_REG_R_REMOTE_EMERG);
man_id = i2c_smbus_read_byte_data(new_client,
LM90_REG_R_MAN_ID);
reg_emerg2 = i2c_smbus_read_byte_data(new_client,
MAX6659_REG_R_REMOTE_EMERG);
reg_status2 = i2c_smbus_read_byte_data(new_client,
MAX6696_REG_R_STATUS2);
if (reg_emerg < 0 || man_id < 0 || reg_emerg2 < 0
|| reg_status2 < 0)
return -ENODEV;

/*
Expand Down

0 comments on commit 6dd49cc

Please sign in to comment.