diff options
author | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2017-02-24 19:14:34 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-02-27 19:20:29 +0300 |
commit | ac7d3af84b24eb20d2ac945c525147d24d7b230b (patch) | |
tree | b026233a72d7426719e2e3ddaeb2d97988755939 /drivers/gpu/drm/sti | |
parent | 38b0b219fbe89d824213beabf03bfb00b5d2c8fa (diff) | |
download | linux-ac7d3af84b24eb20d2ac945c525147d24d7b230b.tar.xz |
drm: sti: make driver use devm_of_platform_populate()
This make sure that of_platform_depopulate() is called if an error
occur in probe after populating the date from the device tree.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1487952874-23635-3-git-send-email-benjamin.gaignard@linaro.org
Diffstat (limited to 'drivers/gpu/drm/sti')
-rw-r--r-- | drivers/gpu/drm/sti/sti_drv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index 3114f125b863..3b15c2cb2306 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -324,7 +324,7 @@ static int sti_platform_probe(struct platform_device *pdev) dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); - of_platform_populate(node, NULL, NULL, dev); + devm_of_platform_populate(dev); child_np = of_get_next_available_child(node, NULL); @@ -340,7 +340,6 @@ static int sti_platform_probe(struct platform_device *pdev) static int sti_platform_remove(struct platform_device *pdev) { component_master_del(&pdev->dev, &sti_ops); - of_platform_depopulate(&pdev->dev); return 0; } |