lkml.org 
[lkml]   [2017]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mfd: ssbi: Use devm_of_platform_populate()
Date
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(-)

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[] = {
--
2.7.4
\
 
 \ /
  Last update: 2017-10-25 16:16    [W:1.171 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site