Commit 69698bde authored by Guenter Roeck's avatar Guenter Roeck

hwmon: (adm9240) Drop log messages from detect function

Not detecting a chip in the detect function is normal and should not
generate any log messages, much less error messages.

Cc: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Reviewed-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Tested-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 1e28eed1
......@@ -730,26 +730,19 @@ static int adm9240_detect(struct i2c_client *new_client,
return -ENODEV;
/* verify chip: reg address should match i2c address */
if (i2c_smbus_read_byte_data(new_client, ADM9240_REG_I2C_ADDR)
!= address) {
dev_err(&adapter->dev, "detect fail: address match, 0x%02x\n",
address);
if (i2c_smbus_read_byte_data(new_client, ADM9240_REG_I2C_ADDR) != address)
return -ENODEV;
}
/* check known chip manufacturer */
man_id = i2c_smbus_read_byte_data(new_client, ADM9240_REG_MAN_ID);
if (man_id == 0x23) {
if (man_id == 0x23)
name = "adm9240";
} else if (man_id == 0xda) {
else if (man_id == 0xda)
name = "ds1780";
} else if (man_id == 0x01) {
else if (man_id == 0x01)
name = "lm81";
} else {
dev_err(&adapter->dev, "detect fail: unknown manuf, 0x%02x\n",
man_id);
else
return -ENODEV;
}
/* successful detect, print chip info */
die_rev = i2c_smbus_read_byte_data(new_client, ADM9240_REG_DIE_REV);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment