Commit 122954ed authored by Timo Alho's avatar Timo Alho Committed by Thierry Reding

firmware: tegra: set drvdata earlier

Subdevices of bpmp, such as bpmp-i2c, require the bpmp device's
drvdata to be set during their probe. Currently this is not always the
case. Fix this by calling platform_set_drvdata() earlier during bpmp's
probe.
Signed-off-by: default avatarTimo Alho <talho@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 5771a8c0
...@@ -806,6 +806,8 @@ static int tegra_bpmp_probe(struct platform_device *pdev) ...@@ -806,6 +806,8 @@ static int tegra_bpmp_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "firmware: %s\n", tag); dev_info(&pdev->dev, "firmware: %s\n", tag);
platform_set_drvdata(pdev, bpmp);
err = of_platform_default_populate(pdev->dev.of_node, NULL, &pdev->dev); err = of_platform_default_populate(pdev->dev.of_node, NULL, &pdev->dev);
if (err < 0) if (err < 0)
goto free_mrq; goto free_mrq;
...@@ -822,8 +824,6 @@ static int tegra_bpmp_probe(struct platform_device *pdev) ...@@ -822,8 +824,6 @@ static int tegra_bpmp_probe(struct platform_device *pdev)
if (err < 0) if (err < 0)
goto free_mrq; goto free_mrq;
platform_set_drvdata(pdev, bpmp);
return 0; return 0;
free_mrq: free_mrq:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment