mfd: exynos: Use devm_of_platform_populate()
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>
Mon, 29 May 2017 15:45:56 +0000 (17:45 +0200)
committerLee Jones <lee.jones@linaro.org>
Thu, 6 Jul 2017 07:29:12 +0000 (08:29 +0100)
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@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/exynos-lpass.c

index 0bf3aeb..ca829f8 100644 (file)
@@ -138,7 +138,7 @@ static int exynos_lpass_probe(struct platform_device *pdev)
        pm_runtime_enable(dev);
        exynos_lpass_enable(lpass);
 
-       return of_platform_populate(dev->of_node, NULL, NULL, dev);
+       return devm_of_platform_populate(dev);
 }
 
 static int exynos_lpass_remove(struct platform_device *pdev)