diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-10-01 15:23:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-04 14:15:13 +0200 |
commit | 5d88ef9eead8b5756122cc799593780d15dae471 (patch) | |
tree | f8fd0b64419bddc622b7114377aaa94afd3fe08f /drivers/usb/host | |
parent | 9ac0fc3906ec88663282f325f92486cf863f9c2b (diff) | |
download | linux-5d88ef9eead8b5756122cc799593780d15dae471.tar.gz linux-5d88ef9eead8b5756122cc799593780d15dae471.tar.bz2 linux-5d88ef9eead8b5756122cc799593780d15dae471.zip |
usb: host: xhci-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>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20191001132333.20146-4-brgl@bgdev.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/xhci-tegra.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index 742960adde94..111a16376087 100644 --- a/drivers/usb/host/xhci-tegra.c +++ b/drivers/usb/host/xhci-tegra.c @@ -1126,8 +1126,9 @@ static int tegra_xusb_probe(struct platform_device *pdev) goto put_powerdomains; } - for (i = 0; i < tegra->soc->num_supplies; i++) - tegra->supplies[i].supply = tegra->soc->supply_names[i]; + regulator_bulk_set_supply_names(tegra->supplies, + tegra->soc->supply_names, + tegra->soc->num_supplies); err = devm_regulator_bulk_get(&pdev->dev, tegra->soc->num_supplies, tegra->supplies); |