[PATCH 03/15] drm: zte: use devm_of_platform_populate()

Benjamin Gaignard benjamin.gaignard at linaro.org
Mon May 29 15:45:51 UTC 2017


Use devm_of_platform_populate() to be sure that of_platform_depopulate
is called when removing the driver.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard at linaro.org>

CC: Shawn Guo <shawnguo at kernel.org>
CC: David Airlie <airlied at linux.ie>
CC: dri-devel at lists.freedesktop.org
CC: linux-kernel at vger.kernel.org
---
 drivers/gpu/drm/zte/zx_drm_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c
index 614e854..f2b1e5f 100644
--- a/drivers/gpu/drm/zte/zx_drm_drv.c
+++ b/drivers/gpu/drm/zte/zx_drm_drv.c
@@ -196,7 +196,7 @@ static int zx_drm_probe(struct platform_device *pdev)
 	struct component_match *match = NULL;
 	int ret;
 
-	ret = of_platform_populate(parent, NULL, NULL, dev);
+	ret = devm_of_platform_populate(dev);
 	if (ret)
 		return ret;
 
-- 
1.9.1



More information about the dri-devel mailing list