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: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Benjamin Gaignard 2017-05-29 17:46:01 +02:00 committed by Lee Jones
parent 6f00f8c863
commit 66002163f0
1 changed files with 1 additions and 2 deletions

View File

@ -69,8 +69,7 @@ static int smsc_i2c_probe(struct i2c_client *i2c,
#ifdef CONFIG_OF
if (i2c->dev.of_node)
ret = of_platform_populate(i2c->dev.of_node,
NULL, NULL, &i2c->dev);
ret = devm_of_platform_populate(&i2c->dev);
#endif
return ret;