lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 29 May 2017 17:45:52 +0200
From:   Benjamin Gaignard <benjamin.gaignard@...aro.org>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Benjamin Gaignard <benjamin.gaignard@...aro.org>,
        Rob Clark <robdclark@...il.com>,
        David Airlie <airlied@...ux.ie>, linux-arm-msm@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, freedreno@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 04/15] drm: msm: use devm_of_platform_populate()

Use devm_of_platform_populate() to simplify driver code.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...aro.org>
CC: Rob Clark <robdclark@...il.com>
CC: David Airlie <airlied@...ux.ie>
CC: linux-arm-msm@...r.kernel.org
CC: dri-devel@...ts.freedesktop.org
CC: freedreno@...ts.freedesktop.org
CC: linux-kernel@...r.kernel.org
---
 drivers/gpu/drm/msm/msm_drv.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 87b5695..545fb6f 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -969,7 +969,7 @@ static int add_display_components(struct device *dev,
 	 * to our components list.
 	 */
 	if (of_device_is_compatible(dev->of_node, "qcom,mdss")) {
-		ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
+		ret = devm_of_platform_populate(dev);
 		if (ret) {
 			dev_err(dev, "failed to populate children devices\n");
 			return ret;
@@ -978,7 +978,6 @@ static int add_display_components(struct device *dev,
 		mdp_dev = device_find_child(dev, NULL, compare_name_mdp);
 		if (!mdp_dev) {
 			dev_err(dev, "failed to find MDSS MDP node\n");
-			of_platform_depopulate(dev);
 			return -ENODEV;
 		}
 
@@ -992,11 +991,7 @@ static int add_display_components(struct device *dev,
 		mdp_dev = dev;
 	}
 
-	ret = add_components_mdp(mdp_dev, matchptr);
-	if (ret)
-		of_platform_depopulate(dev);
-
-	return ret;
+	return add_components_mdp(mdp_dev, matchptr);
 }
 
 /*
@@ -1072,7 +1067,6 @@ static int msm_pdev_probe(struct platform_device *pdev)
 static int msm_pdev_remove(struct platform_device *pdev)
 {
 	component_master_del(&pdev->dev, &msm_drm_ops);
-	of_platform_depopulate(&pdev->dev);
 
 	return 0;
 }
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ