regulator: tps65132: Remove unneeded fields from struct tps65132_regulator
These fields are not really need, remove them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
563943864f
commit
2e62e03333
|
@ -55,10 +55,7 @@ struct tps65132_reg_pdata {
|
||||||
|
|
||||||
struct tps65132_regulator {
|
struct tps65132_regulator {
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
struct regmap *rmap;
|
|
||||||
struct regulator_desc *rdesc[TPS65132_MAX_REGULATORS];
|
|
||||||
struct tps65132_reg_pdata reg_pdata[TPS65132_MAX_REGULATORS];
|
struct tps65132_reg_pdata reg_pdata[TPS65132_MAX_REGULATORS];
|
||||||
struct regulator_dev *rdev[TPS65132_MAX_REGULATORS];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int tps65132_regulator_enable(struct regulator_dev *rdev)
|
static int tps65132_regulator_enable(struct regulator_dev *rdev)
|
||||||
|
@ -225,6 +222,8 @@ static int tps65132_probe(struct i2c_client *client,
|
||||||
{
|
{
|
||||||
struct device *dev = &client->dev;
|
struct device *dev = &client->dev;
|
||||||
struct tps65132_regulator *tps;
|
struct tps65132_regulator *tps;
|
||||||
|
struct regulator_dev *rdev;
|
||||||
|
struct regmap *rmap;
|
||||||
struct regulator_config config = { };
|
struct regulator_config config = { };
|
||||||
int id;
|
int id;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -233,9 +232,9 @@ static int tps65132_probe(struct i2c_client *client,
|
||||||
if (!tps)
|
if (!tps)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
tps->rmap = devm_regmap_init_i2c(client, &tps65132_regmap_config);
|
rmap = devm_regmap_init_i2c(client, &tps65132_regmap_config);
|
||||||
if (IS_ERR(tps->rmap)) {
|
if (IS_ERR(rmap)) {
|
||||||
ret = PTR_ERR(tps->rmap);
|
ret = PTR_ERR(rmap);
|
||||||
dev_err(dev, "regmap init failed: %d\n", ret);
|
dev_err(dev, "regmap init failed: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -244,18 +243,16 @@ static int tps65132_probe(struct i2c_client *client,
|
||||||
tps->dev = dev;
|
tps->dev = dev;
|
||||||
|
|
||||||
for (id = 0; id < TPS65132_MAX_REGULATORS; ++id) {
|
for (id = 0; id < TPS65132_MAX_REGULATORS; ++id) {
|
||||||
tps->rdesc[id] = &tps_regs_desc[id];
|
config.regmap = rmap;
|
||||||
|
|
||||||
config.regmap = tps->rmap;
|
|
||||||
config.dev = dev;
|
config.dev = dev;
|
||||||
config.driver_data = tps;
|
config.driver_data = tps;
|
||||||
|
|
||||||
tps->rdev[id] = devm_regulator_register(dev,
|
rdev = devm_regulator_register(dev, &tps_regs_desc[id],
|
||||||
tps->rdesc[id], &config);
|
&config);
|
||||||
if (IS_ERR(tps->rdev[id])) {
|
if (IS_ERR(rdev)) {
|
||||||
ret = PTR_ERR(tps->rdev[id]);
|
ret = PTR_ERR(rdev);
|
||||||
dev_err(dev, "regulator %s register failed: %d\n",
|
dev_err(dev, "regulator %s register failed: %d\n",
|
||||||
tps->rdesc[id]->name, ret);
|
tps_regs_desc[id].name, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue