diff options
Diffstat (limited to 'drivers/hwmon/lm77.c')
| -rw-r--r-- | drivers/hwmon/lm77.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/lm77.c b/drivers/hwmon/lm77.c index 7570c9d50ddc..80f7a6a3f9a2 100644 --- a/drivers/hwmon/lm77.c +++ b/drivers/hwmon/lm77.c @@ -55,7 +55,7 @@ static const u8 temp_regs[t_num_temp] = { struct lm77_data { struct i2c_client *client; struct mutex update_lock; - char valid; + bool valid; unsigned long last_updated; /* In jiffies */ int temp[t_num_temp]; /* index using temp_index */ u8 alarms; @@ -118,7 +118,7 @@ static struct lm77_data *lm77_update_device(struct device *dev) data->alarms = lm77_read_value(client, LM77_REG_TEMP) & 0x0007; data->last_updated = jiffies; - data->valid = 1; + data->valid = true; } mutex_unlock(&data->update_lock); @@ -302,7 +302,7 @@ static int lm77_detect(struct i2c_client *client, struct i2c_board_info *info) || i2c_smbus_read_word_data(client, 7) != min) return -ENODEV; - strlcpy(info->type, "lm77", I2C_NAME_SIZE); + strscpy(info->type, "lm77", I2C_NAME_SIZE); return 0; } @@ -337,7 +337,7 @@ static int lm77_probe(struct i2c_client *client) } static const struct i2c_device_id lm77_id[] = { - { "lm77", 0 }, + { "lm77" }, { } }; MODULE_DEVICE_TABLE(i2c, lm77_id); @@ -348,7 +348,7 @@ static struct i2c_driver lm77_driver = { .driver = { .name = "lm77", }, - .probe_new = lm77_probe, + .probe = lm77_probe, .id_table = lm77_id, .detect = lm77_detect, .address_list = normal_i2c, |
