diff options
Diffstat (limited to 'drivers/hwmon/lm63.c')
| -rw-r--r-- | drivers/hwmon/lm63.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c index 339a145afc09..035176a98ce9 100644 --- a/drivers/hwmon/lm63.c +++ b/drivers/hwmon/lm63.c @@ -33,7 +33,7 @@ #include <linux/hwmon.h> #include <linux/err.h> #include <linux/mutex.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/sysfs.h> #include <linux/types.h> @@ -996,11 +996,11 @@ static int lm63_detect(struct i2c_client *client, } if (chip_id == 0x41 && address == 0x4c) - strlcpy(info->type, "lm63", I2C_NAME_SIZE); + strscpy(info->type, "lm63", I2C_NAME_SIZE); else if (chip_id == 0x51 && (address == 0x18 || address == 0x4e)) - strlcpy(info->type, "lm64", I2C_NAME_SIZE); + strscpy(info->type, "lm64", I2C_NAME_SIZE); else if (chip_id == 0x49 && address == 0x4c) - strlcpy(info->type, "lm96163", I2C_NAME_SIZE); + strscpy(info->type, "lm96163", I2C_NAME_SIZE); else return -ENODEV; @@ -1104,10 +1104,7 @@ static int lm63_probe(struct i2c_client *client) mutex_init(&data->update_lock); /* Set the device type */ - if (client->dev.of_node) - data->kind = (enum chips)of_device_get_match_data(&client->dev); - else - data->kind = i2c_match_id(lm63_id, client)->driver_data; + data->kind = (uintptr_t)i2c_get_match_data(client); if (data->kind == lm64) data->temp2_offset = 16000; @@ -1164,7 +1161,7 @@ static struct i2c_driver lm63_driver = { .name = "lm63", .of_match_table = of_match_ptr(lm63_of_match), }, - .probe_new = lm63_probe, + .probe = lm63_probe, .id_table = lm63_id, .detect = lm63_detect, .address_list = normal_i2c, |
