Skip to content

Commit

Permalink
mfd: tps65910: Initialize mfd devices after all initialization done
Browse files Browse the repository at this point in the history
Add sub devices of tps65910 after all initialization like interrupt,
clock etc. is done. This will make sure that require data gets
initialized properly before sub devices probe's get called.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Laxman Dewangan authored and Samuel Ortiz committed Nov 20, 2012
1 parent 7aae79f commit 10ecb80
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions drivers/mfd/tps65910.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,6 @@ static __devinit int tps65910_i2c_probe(struct i2c_client *i2c,
return ret;
}

ret = mfd_add_devices(tps65910->dev, -1,
tps65910s, ARRAY_SIZE(tps65910s),
NULL, 0, NULL);
if (ret < 0) {
dev_err(&i2c->dev, "mfd_add_devices failed: %d\n", ret);
return ret;
}

init_data->irq = pmic_plat_data->irq;
init_data->irq_base = pmic_plat_data->irq_base;

Expand All @@ -299,6 +291,14 @@ static __devinit int tps65910_i2c_probe(struct i2c_client *i2c,
pm_power_off = tps65910_power_off;
}

ret = mfd_add_devices(tps65910->dev, -1,
tps65910s, ARRAY_SIZE(tps65910s),
NULL, 0, NULL);
if (ret < 0) {
dev_err(&i2c->dev, "mfd_add_devices failed: %d\n", ret);
return ret;
}

return ret;
}

Expand Down

0 comments on commit 10ecb80

Please sign in to comment.