summaryrefslogtreecommitdiffstats
path: root/drivers/phy/tegra
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2019-10-01 15:23:32 +0200
committerKishon Vijay Abraham I <kishon@ti.com>2019-10-25 17:58:13 +0530
commit64d5989c1ae52407e63c6387863a75036a03e2f8 (patch)
tree3a9fcf2d06840f5ffb8db19807f18f3f9b004589 /drivers/phy/tegra
parent54fad40d3f01c5d14e2ba123b2753029dd6a4cbd (diff)
downloadlinux-stable-64d5989c1ae52407e63c6387863a75036a03e2f8.tar.gz
linux-stable-64d5989c1ae52407e63c6387863a75036a03e2f8.tar.bz2
linux-stable-64d5989c1ae52407e63c6387863a75036a03e2f8.zip
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>
Diffstat (limited to 'drivers/phy/tegra')
-rw-r--r--drivers/phy/tegra/xusb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index bf4b00853438..f98ec3922c02 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -927,7 +927,6 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev)
struct tegra_xusb_padctl *padctl;
const struct of_device_id *match;
struct resource *res;
- unsigned int i;
int err;
/* for backwards compatibility with old device trees */
@@ -972,8 +971,9 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev)
goto remove;
}
- for (i = 0; i < padctl->soc->num_supplies; i++)
- padctl->supplies[i].supply = padctl->soc->supply_names[i];
+ regulator_bulk_set_supply_names(padctl->supplies,
+ padctl->soc->supply_names,
+ padctl->soc->num_supplies);
err = devm_regulator_bulk_get(&pdev->dev, padctl->soc->num_supplies,
padctl->supplies);