summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>2017-05-29 11:45:59 -0400
committerLee Jones <lee.jones@linaro.org>2017-07-06 03:29:12 -0400
commit124e9deb1c40cc8c6fdf56bcb851500423eb9f13 (patch)
tree61ac036219ed2eda6f80ad24c8b19b05757a542a
parent11ee55d94e628a9931564372df23ae054834c38f (diff)
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: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/palmas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index 9103affedcbc..3922a93f9f92 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -676,7 +676,7 @@ no_irq:
676 * otherwise continue and add devices using mfd helpers. 676 * otherwise continue and add devices using mfd helpers.
677 */ 677 */
678 if (node) { 678 if (node) {
679 ret = of_platform_populate(node, NULL, NULL, &i2c->dev); 679 ret = devm_of_platform_populate(&i2c->dev);
680 if (ret < 0) { 680 if (ret < 0) {
681 goto err_irq; 681 goto err_irq;
682 } else if (pdata->pm_off && !pm_power_off) { 682 } else if (pdata->pm_off && !pm_power_off) {