diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/thmc50.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hwmon/thmc50.c b/drivers/hwmon/thmc50.c index fb02834897f3..04dd7699b3ac 100644 --- a/drivers/hwmon/thmc50.c +++ b/drivers/hwmon/thmc50.c | |||
@@ -259,7 +259,7 @@ static int thmc50_detect(struct i2c_adapter *adapter, int address, int kind) | |||
259 | struct thmc50_data *data; | 259 | struct thmc50_data *data; |
260 | struct device *dev; | 260 | struct device *dev; |
261 | int err = 0; | 261 | int err = 0; |
262 | const char *type_name = ""; | 262 | const char *type_name; |
263 | 263 | ||
264 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { | 264 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { |
265 | pr_debug("thmc50: detect failed, " | 265 | pr_debug("thmc50: detect failed, " |
@@ -309,13 +309,9 @@ static int thmc50_detect(struct i2c_adapter *adapter, int address, int kind) | |||
309 | pr_debug("thmc50: Detection of THMC50/ADM1022 failed\n"); | 309 | pr_debug("thmc50: Detection of THMC50/ADM1022 failed\n"); |
310 | goto exit_free; | 310 | goto exit_free; |
311 | } | 311 | } |
312 | pr_debug("thmc50: Detected %s (version %x, revision %x)\n", | ||
313 | type_name, (revision >> 4) - 0xc, revision & 0xf); | ||
314 | data->type = kind; | 312 | data->type = kind; |
315 | 313 | ||
316 | if (kind == thmc50) | 314 | if (kind == adm1022) { |
317 | type_name = "thmc50"; | ||
318 | else if (kind == adm1022) { | ||
319 | int id = i2c_adapter_id(client->adapter); | 315 | int id = i2c_adapter_id(client->adapter); |
320 | int i; | 316 | int i; |
321 | 317 | ||
@@ -328,7 +324,11 @@ static int thmc50_detect(struct i2c_adapter *adapter, int address, int kind) | |||
328 | data->has_temp3 = 1; | 324 | data->has_temp3 = 1; |
329 | break; | 325 | break; |
330 | } | 326 | } |
327 | } else { | ||
328 | type_name = "thmc50"; | ||
331 | } | 329 | } |
330 | pr_debug("thmc50: Detected %s (version %x, revision %x)\n", | ||
331 | type_name, (revision >> 4) - 0xc, revision & 0xf); | ||
332 | 332 | ||
333 | /* Fill in the remaining client fields & put it into the global list */ | 333 | /* Fill in the remaining client fields & put it into the global list */ |
334 | strlcpy(client->name, type_name, I2C_NAME_SIZE); | 334 | strlcpy(client->name, type_name, I2C_NAME_SIZE); |