]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mfd: twl-core: Do not try to call legacy mfd add_children() when booted with DT
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 16 Jan 2013 13:53:54 +0000 (14:53 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 13 Feb 2013 23:22:50 +0000 (00:22 +0100)
There is really no point to retry to add children devices in case the
of_platform_populate() fails.
We do not have any information provided via pdata in this case anyways.
Depending on the boot type (legacy or DT) only execute either one.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/twl-core.c

index fbff8301dfca9c6a985b93b57796c7012da2bee8..86cca9e09380f4ad0672514f3ff19531bdbd6d7a 100644 (file)
@@ -1305,10 +1305,9 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
                twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);
        }
 
-       status = -ENODEV;
        if (node)
                status = of_platform_populate(node, NULL, NULL, &client->dev);
-       if (status)
+       else
                status = add_children(pdata, irq_base, id->driver_data);
 
 fail: