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

Signed-off-by: Benjamin Gaignard <benjamin.gaign...@linaro.org>

CC: Shawn Guo <shawn...@kernel.org>
CC: David Airlie <airl...@linux.ie>
CC: dri-devel@lists.freedesktop.org
CC: linux-ker...@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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to