mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
phy: tegra: use regulator_bulk_set_supply_names()
Use the new regulator helper instead of a for loop. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
This commit is contained in:
parent
54fad40d3f
commit
64d5989c1a
@ -927,7 +927,6 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev)
|
|||||||
struct tegra_xusb_padctl *padctl;
|
struct tegra_xusb_padctl *padctl;
|
||||||
const struct of_device_id *match;
|
const struct of_device_id *match;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
unsigned int i;
|
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
/* for backwards compatibility with old device trees */
|
/* for backwards compatibility with old device trees */
|
||||||
@ -972,8 +971,9 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev)
|
|||||||
goto remove;
|
goto remove;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < padctl->soc->num_supplies; i++)
|
regulator_bulk_set_supply_names(padctl->supplies,
|
||||||
padctl->supplies[i].supply = padctl->soc->supply_names[i];
|
padctl->soc->supply_names,
|
||||||
|
padctl->soc->num_supplies);
|
||||||
|
|
||||||
err = devm_regulator_bulk_get(&pdev->dev, padctl->soc->num_supplies,
|
err = devm_regulator_bulk_get(&pdev->dev, padctl->soc->num_supplies,
|
||||||
padctl->supplies);
|
padctl->supplies);
|
||||||
|
Loading…
Reference in New Issue
Block a user