drm: zte: use devm_of_platform_populate()
authorBenjamin Gaignard <[email protected]>
Mon, 29 May 2017 15:45:51 +0000 (17:45 +0200)
committerShawn Guo <[email protected]>
Mon, 5 Jun 2017 01:57:14 +0000 (09:57 +0800)
Use devm_of_platform_populate() to be sure that of_platform_depopulate
is called when removing the driver.

Signed-off-by: Benjamin Gaignard <[email protected]>
CC: Shawn Guo <[email protected]>
CC: David Airlie <[email protected]>
CC: [email protected]
CC: [email protected]
Signed-off-by: Shawn Guo <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/zte/zx_drm_drv.c

index 490aafc9961050922b099c15db6029dbc371aeed..f46c855d274bd391d0c232458b9dd29c39534e62 100644 (file)
@@ -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;