Skip to content

Commit

Permalink
ahci: tegra: use regulator_bulk_set_supply_names()
Browse files Browse the repository at this point in the history
Use the new regulator helper instead of a for loop.

Acked-by: Thierry Reding <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
brgl authored and axboe committed Oct 25, 2019
1 parent 7d523bd commit e964a17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/ata/ahci_tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e964a17

Please sign in to comment.