diff mbox

mfd: ssbi: Use devm_of_platform_populate()

Message ID 1508940901-3994-1-git-send-email-benjamin.gaignard@linaro.org (mailing list archive)
State Not Applicable, archived
Delegated to: Andy Gross
Headers show

Commit Message

Benjamin Gaignard Oct. 25, 2017, 2:15 p.m. UTC
Use devm_of_platform_populate() instead of 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>
---
 drivers/mfd/ssbi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lee Jones Oct. 31, 2017, 10:49 a.m. UTC | #1
On Wed, 25 Oct 2017, Benjamin Gaignard wrote:

> Use devm_of_platform_populate() instead of 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>
> ---
>  drivers/mfd/ssbi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/mfd/ssbi.c b/drivers/mfd/ssbi.c
index 27986f6..36b96fe 100644
--- a/drivers/mfd/ssbi.c
+++ b/drivers/mfd/ssbi.c
@@ -314,7 +314,7 @@  static int ssbi_probe(struct platform_device *pdev)
 
 	spin_lock_init(&ssbi->lock);
 
-	return of_platform_populate(np, NULL, NULL, &pdev->dev);
+	return devm_of_platform_populate(&pdev->dev);
 }
 
 static const struct of_device_id ssbi_match_table[] = {