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>
This commit is contained in:
parent
7d523bdc30
commit
e964a17d8c
@ -483,7 +483,6 @@ static int tegra_ahci_probe(struct platform_device *pdev)
|
|||||||
struct tegra_ahci_priv *tegra;
|
struct tegra_ahci_priv *tegra;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
int ret;
|
int ret;
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
hpriv = ahci_platform_get_resources(pdev, 0);
|
hpriv = ahci_platform_get_resources(pdev, 0);
|
||||||
if (IS_ERR(hpriv))
|
if (IS_ERR(hpriv))
|
||||||
@ -543,8 +542,9 @@ static int tegra_ahci_probe(struct platform_device *pdev)
|
|||||||
if (!tegra->supplies)
|
if (!tegra->supplies)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
for (i = 0; i < tegra->soc->num_supplies; i++)
|
regulator_bulk_set_supply_names(tegra->supplies,
|
||||||
tegra->supplies[i].supply = tegra->soc->supply_names[i];
|
tegra->soc->supply_names,
|
||||||
|
tegra->soc->num_supplies);
|
||||||
|
|
||||||
ret = devm_regulator_bulk_get(&pdev->dev,
|
ret = devm_regulator_bulk_get(&pdev->dev,
|
||||||
tegra->soc->num_supplies,
|
tegra->soc->num_supplies,
|
||||||
|
Loading…
Reference in New Issue
Block a user