X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fhwmon%2Flm90.c;h=f7ec95bedbf6a5c294c0f17c6b97063aa3bd4da5;hb=cb96b8ca11644ee1223e0fb3f1f629ead15203cb;hp=960df9fa75afe16cc4d0ecad7bf6130f4cb665e4;hpb=f563d53c30f3e60cde3a194cc1a87284ee0b3366;p=powerpc.git diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index 960df9fa75..f7ec95bedb 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c @@ -204,7 +204,6 @@ static struct i2c_driver lm90_driver = { .driver = { .name = "lm90", }, - .id = I2C_DRIVERID_LM90, .attach_adapter = lm90_attach_adapter, .detach_client = lm90_detach_client, }; @@ -531,24 +530,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, - ®_config1) < 0 - || lm90_read_reg(new_client, LM90_REG_R_CONVRATE, - ®_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, - ®_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