Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: (41 commits) hwmon: (adt7475) Add VID support for the ADT7476 hwmon: (adt7475) Add an entry in MAINTAINERS hwmon: (adt7475) Add support for the ADT7476 hwmon: (adt7475) Voltage attenuators can be bypassed hwmon: (adt7475) Print device information on probe hwmon: (adt7475) Handle alternative pin functions hwmon: (adt7475) Move sysfs files removal to a separate function hwmon: (adt7475) Add support for the ADT7490 hwmon: (adt7475) Improve device detection hwmon: (adt7475) Add missing static marker hwmon: (adt7475) Rework voltage inputs handling hwmon: (adt7475) Implement pwm_use_point2_pwm_at_crit hwmon: (adt7475) New documentation hwmon: (adt7475) Add support for the ADT7473 hwmon: (f71882fg) Add support for the f71889fg (version 2) hwmon: (f71882fg) Fix sysfs file removal hwmon: (f71882fg) Cleanup sysfs attr creation 2/2 hwmon: (f71882fg) Cleanup sysfs attr creation 1/2 hwmon: (thmc50) Stop using I2C_CLIENT_MODULE_PARM hwmon: Add Freescale MC13783 ADC driver ...
This commit is contained in:
@@ -2505,34 +2505,24 @@ static int lm93_detect(struct i2c_client *client, int kind,
|
||||
struct i2c_board_info *info)
|
||||
{
|
||||
struct i2c_adapter *adapter = client->adapter;
|
||||
int mfr, ver;
|
||||
|
||||
if (!i2c_check_functionality(adapter, LM93_SMBUS_FUNC_MIN))
|
||||
return -ENODEV;
|
||||
|
||||
/* detection */
|
||||
if (kind < 0) {
|
||||
int mfr = lm93_read_byte(client, LM93_REG_MFR_ID);
|
||||
|
||||
if (mfr != 0x01) {
|
||||
dev_dbg(&adapter->dev,"detect failed, "
|
||||
"bad manufacturer id 0x%02x!\n", mfr);
|
||||
return -ENODEV;
|
||||
}
|
||||
mfr = lm93_read_byte(client, LM93_REG_MFR_ID);
|
||||
if (mfr != 0x01) {
|
||||
dev_dbg(&adapter->dev,
|
||||
"detect failed, bad manufacturer id 0x%02x!\n", mfr);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (kind <= 0) {
|
||||
int ver = lm93_read_byte(client, LM93_REG_VER);
|
||||
|
||||
if ((ver == LM93_MFR_ID) || (ver == LM93_MFR_ID_PROTOTYPE)) {
|
||||
kind = lm93;
|
||||
} else {
|
||||
dev_dbg(&adapter->dev,"detect failed, "
|
||||
"bad version id 0x%02x!\n", ver);
|
||||
if (kind == 0)
|
||||
dev_dbg(&adapter->dev,
|
||||
"(ignored 'force' parameter)\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
ver = lm93_read_byte(client, LM93_REG_VER);
|
||||
if (ver != LM93_MFR_ID && ver != LM93_MFR_ID_PROTOTYPE) {
|
||||
dev_dbg(&adapter->dev,
|
||||
"detect failed, bad version id 0x%02x!\n", ver);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
strlcpy(info->type, "lm93", I2C_NAME_SIZE);
|
||||
|
Reference in New Issue
Block a user