summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorMarc Titinger <mtitinger@baylibre.com>2015-10-29 10:07:17 +0100
committerGuenter Roeck <linux@roeck-us.net>2015-10-31 08:46:01 -0700
commit5aa4e83dd54a3b33d0f2fbab0a1f06a3614a5949 (patch)
tree3d686ed0231e540c2286ee767ae7e0fada211688 /drivers/hwmon
parent50224f4d0959981ed03c407af1f35ed7917ae097 (diff)
hwmon: (ina2xx) remove no longer used variable 'kind'
Signed-off-by: Marc Titinger <mtitinger@baylibre.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/ina2xx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c
index 1ba0c72c2b8f..b24f1d3045f0 100644
--- a/drivers/hwmon/ina2xx.c
+++ b/drivers/hwmon/ina2xx.c
@@ -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,