usb: host: xhci-tegra: use regulator_bulk_set_supply_names()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 1 Oct 2019 13:23:33 +0000 (15:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2019 12:15:13 +0000 (14:15 +0200)
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>
drivers/usb/host/xhci-tegra.c

index 742960a..111a163 100644 (file)
@@ -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);