[PATCH] drm/msm: mdss: use devres version of interface to populate children devices

Vladimir Zapolskiy vladimir.zapolskiy at linaro.org
Wed May 7 19:35:38 UTC 2025


Trivial change, there is a managed device resource version of
of_platform_populate(), and its usage simplifies the code a bit.

Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy at linaro.org>
---
 drivers/gpu/drm/msm/msm_mdss.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c
index dcb49fd30402..116e8f93f8c8 100644
--- a/drivers/gpu/drm/msm/msm_mdss.c
+++ b/drivers/gpu/drm/msm/msm_mdss.c
@@ -550,7 +550,7 @@ static int mdss_probe(struct platform_device *pdev)
 	 * Populate the children devices, find the MDP5/DPU node, and then add
 	 * the interfaces to our components list.
 	 */
-	ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
+	ret = devm_of_platform_populate(dev);
 	if (ret) {
 		DRM_DEV_ERROR(dev, "failed to populate children devices\n");
 		msm_mdss_destroy(mdss);
@@ -564,8 +564,6 @@ static void mdss_remove(struct platform_device *pdev)
 {
 	struct msm_mdss *mdss = platform_get_drvdata(pdev);
 
-	of_platform_depopulate(&pdev->dev);
-
 	msm_mdss_destroy(mdss);
 }
 
-- 
2.45.2



More information about the dri-devel mailing list