diff mbox series

[08/15] mfd: exynos: use devm_of_platform_populate()

Message ID 1496072763-31209-9-git-send-email-benjamin.gaignard@linaro.org
State Accepted
Commit 11ee55d94e628a9931564372df23ae054834c38f
Headers show
Series [01/15] iio: adc: stm32: use devm_of_platform_populate() | expand

Commit Message

Benjamin Gaignard May 29, 2017, 3:45 p.m. UTC
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>


CC: Lee Jones <lee.jones@linaro.org>
CC: Kukjin Kim <kgene@kernel.org>
CC: Krzysztof Kozlowski <krzk@kernel.org>
CC: Javier Martinez Canillas <javier@osg.samsung.com>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-samsung-soc@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
 drivers/mfd/exynos-lpass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1
diff mbox series

Patch

diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c
index 0bf3aeb..ca829f8 100644
--- a/drivers/mfd/exynos-lpass.c
+++ b/drivers/mfd/exynos-lpass.c
@@ -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)