regulator: bd718x7 initialize regulator config only once
The BD718x7 driver initialized common configs for all regulators. Simplify initialization by moving the initialization of common configs out of the loop. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/2d3e68c94d4813410da8c4c7eac3332d167d19a8.1599029334.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Родитель
385d41d7ed
Коммит
df9db2541a
|
@ -1319,6 +1319,9 @@ static int bd718xx_probe(struct platform_device *pdev)
|
|||
}
|
||||
}
|
||||
|
||||
config.dev = pdev->dev.parent;
|
||||
config.regmap = mfd->chip.regmap;
|
||||
|
||||
for (i = 0; i < num_reg_data; i++) {
|
||||
|
||||
const struct regulator_desc *desc;
|
||||
|
@ -1328,8 +1331,6 @@ static int bd718xx_probe(struct platform_device *pdev)
|
|||
r = ®_data[i];
|
||||
desc = &r->desc;
|
||||
|
||||
config.dev = pdev->dev.parent;
|
||||
config.regmap = mfd->chip.regmap;
|
||||
|
||||
rdev = devm_regulator_register(&pdev->dev, desc, &config);
|
||||
if (IS_ERR(rdev)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче