Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84511
b: refs/heads/master
c: e0ae87a
h: refs/heads/master
i:
  84509: a16023c
  84507: 52baec2
  84503: a5de1fd
  84495: 31575a3
  84479: e30caf1
v: v3
  • Loading branch information
Jean Delvare authored and Mark M. Hoffman committed Feb 8, 2008
1 parent 5cb2397 commit a4a8b5a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 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: 72240307e988627df46553846936aa89a0f6a283
refs/heads/master: e0ae87a49cf3e721313bf8942299f3f140c6963c
26 changes: 13 additions & 13 deletions trunk/drivers/hwmon/lm90.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,24 +531,24 @@ static int lm90_detect(struct i2c_adapter *adapter, int address, int kind)
kind = lm90;

if (kind < 0) { /* detection and identification */
u8 man_id, chip_id, reg_config1, reg_convrate;

if (lm90_read_reg(new_client, LM90_REG_R_MAN_ID,
&man_id) < 0
|| lm90_read_reg(new_client, LM90_REG_R_CHIP_ID,
&chip_id) < 0
|| lm90_read_reg(new_client, LM90_REG_R_CONFIG1,
&reg_config1) < 0
|| lm90_read_reg(new_client, LM90_REG_R_CONVRATE,
&reg_convrate) < 0)
int man_id, chip_id, reg_config1, reg_convrate;

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)
goto exit_free;

if ((address == 0x4C || address == 0x4D)
&& man_id == 0x01) { /* National Semiconductor */
u8 reg_config2;
int reg_config2;

if (lm90_read_reg(new_client, LM90_REG_R_CONFIG2,
&reg_config2) < 0)
if ((reg_config2 = i2c_smbus_read_byte_data(new_client,
LM90_REG_R_CONFIG2)) < 0)
goto exit_free;

if ((reg_config1 & 0x2A) == 0x00
Expand Down

0 comments on commit a4a8b5a

Please sign in to comment.