]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mfd: palmas: Use devm_of_platform_populate()
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>
Mon, 29 May 2017 15:45:59 +0000 (17:45 +0200)
committerLee Jones <lee.jones@linaro.org>
Thu, 6 Jul 2017 07:29:12 +0000 (08:29 +0100)
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>
drivers/mfd/palmas.c

index 9103affedcbc8f40765a3296238d6a39744d84ef..3922a93f9f92420ae9f81f0bcc9c514e80a1e726 100644 (file)
@@ -676,7 +676,7 @@ no_irq:
         * 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) {