diff options
-rw-r--r-- | drivers/regulator/act8865-regulator.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c index a5ff30c8a1e3..b92d7dd01a18 100644 --- a/drivers/regulator/act8865-regulator.c +++ b/drivers/regulator/act8865-regulator.c | |||
@@ -62,7 +62,6 @@ | |||
62 | #define ACT8865_VOLTAGE_NUM 64 | 62 | #define ACT8865_VOLTAGE_NUM 64 |
63 | 63 | ||
64 | struct act8865 { | 64 | struct act8865 { |
65 | struct regulator_dev *rdev[ACT8865_REG_NUM]; | ||
66 | struct regmap *regmap; | 65 | struct regmap *regmap; |
67 | }; | 66 | }; |
68 | 67 | ||
@@ -256,7 +255,7 @@ static inline int act8865_pdata_from_dt(struct device *dev, | |||
256 | static int act8865_pmic_probe(struct i2c_client *client, | 255 | static int act8865_pmic_probe(struct i2c_client *client, |
257 | const struct i2c_device_id *i2c_id) | 256 | const struct i2c_device_id *i2c_id) |
258 | { | 257 | { |
259 | struct regulator_dev **rdev; | 258 | struct regulator_dev *rdev; |
260 | struct device *dev = &client->dev; | 259 | struct device *dev = &client->dev; |
261 | struct act8865_platform_data *pdata = dev_get_platdata(dev); | 260 | struct act8865_platform_data *pdata = dev_get_platdata(dev); |
262 | struct regulator_config config = { }; | 261 | struct regulator_config config = { }; |
@@ -290,8 +289,6 @@ static int act8865_pmic_probe(struct i2c_client *client, | |||
290 | if (!act8865) | 289 | if (!act8865) |
291 | return -ENOMEM; | 290 | return -ENOMEM; |
292 | 291 | ||
293 | rdev = act8865->rdev; | ||
294 | |||
295 | act8865->regmap = devm_regmap_init_i2c(client, &act8865_regmap_config); | 292 | act8865->regmap = devm_regmap_init_i2c(client, &act8865_regmap_config); |
296 | if (IS_ERR(act8865->regmap)) { | 293 | if (IS_ERR(act8865->regmap)) { |
297 | error = PTR_ERR(act8865->regmap); | 294 | error = PTR_ERR(act8865->regmap); |
@@ -311,12 +308,12 @@ static int act8865_pmic_probe(struct i2c_client *client, | |||
311 | config.driver_data = act8865; | 308 | config.driver_data = act8865; |
312 | config.regmap = act8865->regmap; | 309 | config.regmap = act8865->regmap; |
313 | 310 | ||
314 | rdev[i] = devm_regulator_register(&client->dev, | 311 | rdev = devm_regulator_register(&client->dev, &act8865_reg[i], |
315 | &act8865_reg[i], &config); | 312 | &config); |
316 | if (IS_ERR(rdev[i])) { | 313 | if (IS_ERR(rdev)) { |
317 | dev_err(dev, "failed to register %s\n", | 314 | dev_err(dev, "failed to register %s\n", |
318 | act8865_reg[id].name); | 315 | act8865_reg[id].name); |
319 | return PTR_ERR(rdev[i]); | 316 | return PTR_ERR(rdev); |
320 | } | 317 | } |
321 | } | 318 | } |
322 | 319 | ||