diff options
Diffstat (limited to 'drivers/hwmon/ftsteutates.c')
-rw-r--r-- | drivers/hwmon/ftsteutates.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/hwmon/ftsteutates.c b/drivers/hwmon/ftsteutates.c index 371ce7745f5e..f5b8e724a8ca 100644 --- a/drivers/hwmon/ftsteutates.c +++ b/drivers/hwmon/ftsteutates.c @@ -509,7 +509,7 @@ error: /* SysFS structs */ /*****************************************************************************/ -/* Temprature sensors */ +/* Temperature sensors */ static SENSOR_DEVICE_ATTR_RO(temp1_input, temp_value, 0); static SENSOR_DEVICE_ATTR_RO(temp2_input, temp_value, 1); static SENSOR_DEVICE_ATTR_RO(temp3_input, temp_value, 2); @@ -713,7 +713,7 @@ static int fts_detect(struct i2c_client *client, { int val; - /* detection works with revsion greater or equal to 0x2b */ + /* detection works with revision greater or equal to 0x2b */ val = i2c_smbus_read_byte_data(client, FTS_DEVICE_REVISION_REG); if (val < 0x2b) return -ENODEV; @@ -739,20 +739,19 @@ static int fts_detect(struct i2c_client *client, if (val != 0x11) return -ENODEV; - strlcpy(info->type, fts_id[0].name, I2C_NAME_SIZE); + strscpy(info->type, fts_id[0].name, I2C_NAME_SIZE); info->flags = 0; return 0; } -static int fts_remove(struct i2c_client *client) +static void fts_remove(struct i2c_client *client) { struct fts_data *data = dev_get_drvdata(&client->dev); watchdog_unregister_device(&data->wdd); - return 0; } -static int fts_probe(struct i2c_client *client, const struct i2c_device_id *id) +static int fts_probe(struct i2c_client *client) { u8 revision; struct fts_data *data; @@ -819,7 +818,7 @@ static struct i2c_driver fts_driver = { .name = "ftsteutates", }, .id_table = fts_id, - .probe = fts_probe, + .probe_new = fts_probe, .remove = fts_remove, .detect = fts_detect, .address_list = normal_i2c, |