[PATCH 03/15] drm: zte: use devm_of_platform_populate()
From: Benjamin Gaignard
Date: Mon May 29 2017 - 11:46:41 EST
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@xxxxxxxxxx>
CC: Shawn Guo <shawnguo@xxxxxxxxxx>
CC: David Airlie <airlied@xxxxxxxx>
CC: dri-devel@xxxxxxxxxxxxxxxxxxxxx
CC: linux-kernel@xxxxxxxxxxxxxxx
---
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