Skip to content

Commit

Permalink
mfd: twl-core: Do not try to call legacy mfd add_children() when boot…
Browse files Browse the repository at this point in the history
…ed with DT

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>
  • Loading branch information
Peter Ujfalusi authored and Samuel Ortiz committed Feb 13, 2013
1 parent 6dd810b commit e581238
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mfd/twl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e581238

Please sign in to comment.