struct i2c_client *new_client;
struct gl518_data *data;
int err = 0;
- const char *name = "";
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
I2C_FUNC_SMBUS_WORD_DATA))
i = gl518_read_value(new_client, GL518_REG_REVISION);
if (i == 0x00) {
kind = gl518sm_r00;
- name = "gl518sm";
} else if (i == 0x80) {
kind = gl518sm_r80;
- name = "gl518sm";
} else {
if (kind <= 0)
dev_info(&adapter->dev,
}
/* Fill in the remaining client fields */
- strlcpy(new_client->name, name, I2C_NAME_SIZE);
+ strlcpy(new_client->name, "gl518sm", I2C_NAME_SIZE);
new_client->id = gl518_id++;
data->type = kind;
data->valid = 0;
if (man_id == 0x01) { /* National Semiconductor */
if (chip_id == 0x03) {
kind = lm83;
- name = "lm83";
}
}
}
}
+ if (kind == lm83) {
+ name = "lm83";
+ }
+
/* We can fill in the remaining client fields */
strlcpy(new_client->name, name, I2C_NAME_SIZE);
new_client->id = lm83_id++;
LM90_REG_R_CONFIG2) & 0xF8) == 0x00
&& reg_convrate <= 0x09))) {
kind = lm90;
- name = "lm90";
}
}
else if (man_id == 0x41) { /* Analog Devices */
&& (kind == 0 /* skip detection */
|| (reg_config1 & 0x3F) == 0x00)) {
kind = adm1032;
- name = "adm1032";
}
}
}
}
+ if (kind == lm90) {
+ name = "lm90";
+ } else if (kind == adm1032) {
+ name = "adm1032";
+ }
+
/* We can fill in the remaining client fields */
strlcpy(new_client->name, name, I2C_NAME_SIZE);
new_client->id = lm90_id++;
struct i2c_client *new_client;
struct w83l785ts_data *data;
int err = 0;
- const char *name = "";
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
if (man_id == 0x5CA3) { /* Winbond */
if (chip_id == 0x70) { /* W83L785TS-S */
kind = w83l785ts;
- name = "w83l785ts";
}
}
}
/* We can fill in the remaining client fields. */
- strlcpy(new_client->name, name, I2C_NAME_SIZE);
+ strlcpy(new_client->name, "w83l785ts", I2C_NAME_SIZE);
new_client->id = w83l785ts_id++;
data->valid = 0;
init_MUTEX(&data->update_lock);