From cd71016c1fe85e33f45366e90a9f23ddd723114e Mon Sep 17 00:00:00 2001
From: Thierry Reding <treding@nvidia.com>
Date: Fri, 12 Jun 2020 17:00:59 +0200
Subject: gpu: host1x: Register child devices
Git-commit: ca2030d56bb7b73079f834b10de38ced9cac74a3
Patch-mainline: v5.8-rc3
References: jsc#SLE-12680, jsc#SLE-12880, jsc#SLE-12882, jsc#SLE-12883, jsc#SLE-13496, jsc#SLE-15322
In order to remove the dependency on the simple-bus compatible string,
which causes the OF driver core to register all child devices, make the
host1x driver explicitly register its children.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Patrik Jakobsson <pjakobsson@suse.de>
---
drivers/gpu/host1x/dev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index 3c0f151847ba..d0ebb70e2fdd 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -470,8 +470,14 @@ static int host1x_probe(struct platform_device *pdev)
if (err < 0)
goto deinit_debugfs;
+ err = devm_of_platform_populate(&pdev->dev);
+ if (err < 0)
+ goto unregister;
+
return 0;
+unregister:
+ host1x_unregister(host);
deinit_debugfs:
host1x_debug_deinit(host);
host1x_intr_deinit(host);
--
2.28.0