Commit 66002163 authored by Benjamin Gaignard's avatar Benjamin Gaignard Committed by Lee Jones

mfd: smsc-ece: Use devm_of_platform_populate()

Use devm_of_platform_populate() to be sure that of_platform_depopulate
is called when removing the driver.
Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 6f00f8c8
...@@ -69,8 +69,7 @@ static int smsc_i2c_probe(struct i2c_client *i2c, ...@@ -69,8 +69,7 @@ static int smsc_i2c_probe(struct i2c_client *i2c,
#ifdef CONFIG_OF #ifdef CONFIG_OF
if (i2c->dev.of_node) if (i2c->dev.of_node)
ret = of_platform_populate(i2c->dev.of_node, ret = devm_of_platform_populate(&i2c->dev);
NULL, NULL, &i2c->dev);
#endif #endif
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment