Commit 5aa4e83d authored by Marc Titinger's avatar Marc Titinger Committed by Guenter Roeck

hwmon: (ina2xx) remove no longer used variable 'kind'

Signed-off-by: default avatarMarc Titinger <mtitinger@baylibre.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 50224f4d
......@@ -109,7 +109,6 @@ struct ina2xx_data {
struct mutex config_lock;
struct regmap *regmap;
int kind;
const struct attribute_group *groups[INA2XX_MAX_ATTRIBUTE_GROUPS];
};
......@@ -431,8 +430,7 @@ static int ina2xx_probe(struct i2c_client *client,
return -ENOMEM;
/* set the device type */
data->kind = id->driver_data;
data->config = &ina2xx_config[data->kind];
data->config = &ina2xx_config[id->driver_data];
if (of_property_read_u32(dev->of_node, "shunt-resistor", &val) < 0) {
struct ina2xx_platform_data *pdata = dev_get_platdata(dev);
......@@ -465,7 +463,7 @@ static int ina2xx_probe(struct i2c_client *client,
mutex_init(&data->config_lock);
data->groups[group++] = &ina2xx_group;
if (data->kind == ina226)
if (id->driver_data == ina226)
data->groups[group++] = &ina226_group;
hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment