summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2019-10-01 15:23:31 +0200
committerJens Axboe <axboe@kernel.dk>2019-10-25 22:26:41 +0200
commite964a17d8c6356b86aab4cdc3ea7fdc2abd21352 (patch)
treecddab17dba53b690d1456e4b79386836cc4e369c /drivers/ata
parentahci: Add support for Amazon's Annapurna Labs SATA controller (diff)
downloadlinux-e964a17d8c6356b86aab4cdc3ea7fdc2abd21352.tar.xz
linux-e964a17d8c6356b86aab4cdc3ea7fdc2abd21352.zip
ahci: tegra: use regulator_bulk_set_supply_names()
Use the new regulator helper instead of a for loop. Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci_tegra.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
index e3163dae5e85..cb55ebc1725b 100644
--- a/drivers/ata/ahci_tegra.c
+++ b/drivers/ata/ahci_tegra.c
@@ -483,7 +483,6 @@ static int tegra_ahci_probe(struct platform_device *pdev)
struct tegra_ahci_priv *tegra;
struct resource *res;
int ret;
- unsigned int i;
hpriv = ahci_platform_get_resources(pdev, 0);
if (IS_ERR(hpriv))
@@ -543,8 +542,9 @@ static int tegra_ahci_probe(struct platform_device *pdev)
if (!tegra->supplies)
return -ENOMEM;
- 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);
ret = devm_regulator_bulk_get(&pdev->dev,
tegra->soc->num_supplies,