diff options
Diffstat (limited to 'drivers/hwmon/adt7473.c')
-rw-r--r-- | drivers/hwmon/adt7473.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/drivers/hwmon/adt7473.c b/drivers/hwmon/adt7473.c index 0a6ce2367b42..aea244db974e 100644 --- a/drivers/hwmon/adt7473.c +++ b/drivers/hwmon/adt7473.c | |||
@@ -174,7 +174,6 @@ static const struct i2c_device_id adt7473_id[] = { | |||
174 | { "adt7473", adt7473 }, | 174 | { "adt7473", adt7473 }, |
175 | { } | 175 | { } |
176 | }; | 176 | }; |
177 | MODULE_DEVICE_TABLE(i2c, adt7473_id); | ||
178 | 177 | ||
179 | static struct i2c_driver adt7473_driver = { | 178 | static struct i2c_driver adt7473_driver = { |
180 | .class = I2C_CLASS_HWMON, | 179 | .class = I2C_CLASS_HWMON, |
@@ -1090,27 +1089,22 @@ static int adt7473_detect(struct i2c_client *client, int kind, | |||
1090 | struct i2c_board_info *info) | 1089 | struct i2c_board_info *info) |
1091 | { | 1090 | { |
1092 | struct i2c_adapter *adapter = client->adapter; | 1091 | struct i2c_adapter *adapter = client->adapter; |
1092 | int vendor, device, revision; | ||
1093 | 1093 | ||
1094 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 1094 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
1095 | return -ENODEV; | 1095 | return -ENODEV; |
1096 | 1096 | ||
1097 | if (kind <= 0) { | 1097 | vendor = i2c_smbus_read_byte_data(client, ADT7473_REG_VENDOR); |
1098 | int vendor, device, revision; | 1098 | if (vendor != ADT7473_VENDOR) |
1099 | 1099 | return -ENODEV; | |
1100 | vendor = i2c_smbus_read_byte_data(client, ADT7473_REG_VENDOR); | ||
1101 | if (vendor != ADT7473_VENDOR) | ||
1102 | return -ENODEV; | ||
1103 | 1100 | ||
1104 | device = i2c_smbus_read_byte_data(client, ADT7473_REG_DEVICE); | 1101 | device = i2c_smbus_read_byte_data(client, ADT7473_REG_DEVICE); |
1105 | if (device != ADT7473_DEVICE) | 1102 | if (device != ADT7473_DEVICE) |
1106 | return -ENODEV; | 1103 | return -ENODEV; |
1107 | 1104 | ||
1108 | revision = i2c_smbus_read_byte_data(client, | 1105 | revision = i2c_smbus_read_byte_data(client, ADT7473_REG_REVISION); |
1109 | ADT7473_REG_REVISION); | 1106 | if (revision != ADT7473_REV_68 && revision != ADT7473_REV_69) |
1110 | if (revision != ADT7473_REV_68 && revision != ADT7473_REV_69) | 1107 | return -ENODEV; |
1111 | return -ENODEV; | ||
1112 | } else | ||
1113 | dev_dbg(&adapter->dev, "detection forced\n"); | ||
1114 | 1108 | ||
1115 | strlcpy(info->type, "adt7473", I2C_NAME_SIZE); | 1109 | strlcpy(info->type, "adt7473", I2C_NAME_SIZE); |
1116 | 1110 | ||
@@ -1171,6 +1165,8 @@ static int adt7473_remove(struct i2c_client *client) | |||
1171 | 1165 | ||
1172 | static int __init adt7473_init(void) | 1166 | static int __init adt7473_init(void) |
1173 | { | 1167 | { |
1168 | pr_notice("The adt7473 driver is deprecated, please use the adt7475 " | ||
1169 | "driver instead\n"); | ||
1174 | return i2c_add_driver(&adt7473_driver); | 1170 | return i2c_add_driver(&adt7473_driver); |
1175 | } | 1171 | } |
1176 | 1172 | ||