summaryrefslogtreecommitdiff
path: root/drivers/firmware
diff options
context:
space:
mode:
authorTimo Alho <talho@nvidia.com>2017-08-17 12:49:11 +0300
committerThierry Reding <treding@nvidia.com>2017-08-17 14:08:08 +0300
commit122954edfdf5888dbd532acf2b945af15660da66 (patch)
tree25a66619b5e465eeeae02929001b237974ff5c2c /drivers/firmware
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff)
downloadlinux-122954edfdf5888dbd532acf2b945af15660da66.tar.xz
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: Timo Alho <talho@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/tegra/bpmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c
index b25179517cc5..73ca55b7b7ec 100644
--- a/drivers/firmware/tegra/bpmp.c
+++ b/drivers/firmware/tegra/bpmp.c
@@ -806,6 +806,8 @@ static int tegra_bpmp_probe(struct platform_device *pdev)
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);
if (err < 0)
goto free_mrq;
@@ -822,8 +824,6 @@ static int tegra_bpmp_probe(struct platform_device *pdev)
if (err < 0)
goto free_mrq;
- platform_set_drvdata(pdev, bpmp);
-
return 0;
free_mrq: