Skip to content

Commit

Permalink
Merge tag 'tegra-for-4.19-memory' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/tegra/linux into next/drivers

memory: tegra: Changes for v4.19-rc1

This contains a single fix for the initialization order of the various
parts of the Tegra memory controller driver.

* tag 'tegra-for-4.19-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  memory: tegra: Correct driver probe order

Signed-off-by: Olof Johansson <[email protected]>
  • Loading branch information
olofj committed Jul 14, 2018
2 parents 20d87a5 + 1662dd6 commit 7af239f
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions drivers/memory/tegra/mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,13 +672,6 @@ static int tegra_mc_probe(struct platform_device *pdev)
return err;
}

err = tegra_mc_reset_setup(mc);
if (err < 0) {
dev_err(&pdev->dev, "failed to register reset controller: %d\n",
err);
return err;
}

mc->irq = platform_get_irq(pdev, 0);
if (mc->irq < 0) {
dev_err(&pdev->dev, "interrupt not specified\n");
Expand All @@ -697,13 +690,16 @@ static int tegra_mc_probe(struct platform_device *pdev)
return err;
}

err = tegra_mc_reset_setup(mc);
if (err < 0)
dev_err(&pdev->dev, "failed to register reset controller: %d\n",
err);

if (IS_ENABLED(CONFIG_TEGRA_IOMMU_SMMU)) {
mc->smmu = tegra_smmu_probe(&pdev->dev, mc->soc->smmu, mc);
if (IS_ERR(mc->smmu)) {
if (IS_ERR(mc->smmu))
dev_err(&pdev->dev, "failed to probe SMMU: %ld\n",
PTR_ERR(mc->smmu));
return PTR_ERR(mc->smmu);
}
}

return 0;
Expand Down

0 comments on commit 7af239f

Please sign in to comment.