Commit 124e9deb authored by Benjamin Gaignard's avatar Benjamin Gaignard Committed by Lee Jones

mfd: palmas: 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 11ee55d9
......@@ -676,7 +676,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
* otherwise continue and add devices using mfd helpers.
*/
if (node) {
ret = of_platform_populate(node, NULL, NULL, &i2c->dev);
ret = devm_of_platform_populate(&i2c->dev);
if (ret < 0) {
goto err_irq;
} else if (pdata->pm_off && !pm_power_off) {
......
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